Click here to Skip to main content
15,889,216 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: API Calls or VB.NET Code Pin
Niels Penneman9-Jan-04 7:15
Niels Penneman9-Jan-04 7:15 
GeneralDataGrid Text Wrap Pin
betterc29-Dec-03 5:57
betterc29-Dec-03 5:57 
GeneralRe: DataGrid Text Wrap Pin
Bernhard Hofmann13-Feb-04 1:01
Bernhard Hofmann13-Feb-04 1:01 
GeneralRe: DataGrid Text Wrap Pin
Bernhard Hofmann13-Feb-04 1:24
Bernhard Hofmann13-Feb-04 1:24 
GeneralRe: DataGrid Text Wrap Pin
Bernhard Hofmann25-Feb-04 0:46
Bernhard Hofmann25-Feb-04 0:46 
Generalerror of define a instance Pin
Frank Fan28-Dec-03 21:54
Frank Fan28-Dec-03 21:54 
QuestionHow to use array update the xml file?███ Pin
nichen100128-Dec-03 13:43
nichen100128-Dec-03 13:43 
GeneralHelp w/ loop & directing data to field Pin
tiffanydw28-Dec-03 10:29
tiffanydw28-Dec-03 10:29 
Hi! I am in WAY over my head here and was hoping someone could help me out. I need a db that is like a time clock. Employees clock in and out, time is entered into table, and reports are run to show hours worked. I have no formal training in computers, so please bear with me Smile | :) One of my current problems is directing the data to the login or logout field. It only enters into the login field now. My next problem is that I need to tell the user his time is entered, and then refresh the form for the next user. I tried the Docmd.OpenForm, but it opens a new form on top of the previous one, creating quite a mess! I read about loop while or loop until, but...basically I'm clueless Sigh | :sigh: . One more problem---it doesn't always work. I don't see the rhyme or reason, but sometimes the time is entered, sometimes not, and sometimes it is entered for ALL employees. Can anyone help me? Please be gentle, remember, I am new to this!

The set up is:
tblStaff
StaffLoginName
StaffPassword

tblLoginRecords
LogStaffLoginName
LogPasswordEntered
LogINTime <---(all times currently enter here)
LogOUTTime
LogProblem (yes/no check)

frmLogin
bound controls: Your Name [LogStaffLoginName]
Enter Password [LogPasswordEntered]
(hidden) LogTime [LogINTime]
(hidden) LogDate [LogINDate]
Log IN (cmd8)and Log OUT (cmd 9) buttons (code follows)
(hidden) yes/no check box for LogProblem
___________________________________________________________________________
Private Sub Command8_Click()
On Error GoTo Err_CmdLogin_Click

If [LogStaffLoginName] = DLookup("[StaffLoginName]", "TblStaff", "[StaffPassword]=forms!frmlogin!LogPasswordEntered") Then

MsgBox "Your time has been logged.", vbOKOnly, "Login Confirmation."

DoCmd.OpenForm "frmLogin", acNormal

Else
Me!LogProblem = -1
MsgBox "Incorrect UserName or Password. Please try again.", vbOKOnly, "Login Error."
DoCmd.OpenForm "frmLogin"

End If

Forms!frmLogin.Visible = False

Exit_CmdLogin_Click:
Exit Sub

Err_CmdLogin_Click:
MsgBox Err.Description
Resume Exit_CmdLogin_Click


End Sub

Private Sub Command9_Click()


On Error GoTo Err_CmdLogout_Click

If [LogStaffLoginName] = DLookup("[StaffLoginName]", "TblStaff", "[StaffPassword]=forms!frmlogin!LogPasswordEntered") Then
MsgBox "Your time has been logged.", vbOKOnly, "Logout Confirmation."
DoCmd.Save acTable, "[LogOUTTime]", "tblLoginRecords"


Else
Me!LogProblem = -1
MsgBox "Incorrect UserName or Password. Please try again.", vbOKOnly, "Logout Error."
DoCmd.OpenForm "frmLogin"

End If

Forms!frmLogin.Visible = False

Exit_CmdLogout_Click:
Exit Sub

Err_CmdLogout_Click:
MsgBox Err.Description
Resume Exit_CmdLogout_Click

End Sub

__________________________________________________________________________

I know it's a mess now D'Oh! | :doh: sorry. I see that in the form there are controls w/ LogIN times, but I am just not seeing the logic and how-to to seperate these and allow for logOUT times, while tying into the two seperate buttons. I hope that all made sense, and thank you to all for your attention!

Dazed and confused~~~Tiff~~~

I have no special talents. I am only passionately curious.
--Albert Einstein
GeneralRe: Help w/ loop &amp; directing data to field Pin
elRaptor29-Dec-03 8:12
elRaptor29-Dec-03 8:12 
GeneralRe: Help w/ loop &amp; directing data to field Pin
tiffanydw30-Dec-03 5:20
tiffanydw30-Dec-03 5:20 
GeneralNotifyIcon in .net service Pin
mosquitooth28-Dec-03 9:10
mosquitooth28-Dec-03 9:10 
GeneralRe: NotifyIcon in .net service Pin
Ray Cassick29-Dec-03 3:40
Ray Cassick29-Dec-03 3:40 
GeneralTimer Controll IN VB Pin
livega28-Dec-03 2:05
livega28-Dec-03 2:05 
GeneralRe: Timer Controll IN VB Pin
Hesham Amin28-Dec-03 23:56
Hesham Amin28-Dec-03 23:56 
GeneralRe: Timer Controll IN VB Pin
Dave Kreskowiak29-Dec-03 7:21
mveDave Kreskowiak29-Dec-03 7:21 
GeneralRemoving selected text Pin
compukeith28-Dec-03 0:39
compukeith28-Dec-03 0:39 
GeneralRe: Removing selected text Pin
skrtbh28-Dec-03 8:07
skrtbh28-Dec-03 8:07 
GeneralRe: Removing selected text Pin
compukeith28-Dec-03 14:23
compukeith28-Dec-03 14:23 
GeneralRe: Removing selected text Pin
skrtbh29-Dec-03 9:05
skrtbh29-Dec-03 9:05 
GeneralRe: Removing selected text Pin
compukeith29-Dec-03 11:30
compukeith29-Dec-03 11:30 
GeneralRe: Removing selected text Pin
skrtbh29-Dec-03 9:11
skrtbh29-Dec-03 9:11 
GeneralRe: Removing selected text Pin
compukeith29-Dec-03 12:01
compukeith29-Dec-03 12:01 
GeneralRe: Removing selected text Pin
skrtbh30-Dec-03 7:28
skrtbh30-Dec-03 7:28 
GeneralRe: Removing selected text Pin
compukeith30-Dec-03 7:57
compukeith30-Dec-03 7:57 
GeneralRe: Removing selected text Pin
skrtbh30-Dec-03 8:46
skrtbh30-Dec-03 8:46 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.