| | | mjk |  |
| Posted: Thu Sep 11, 2008 7:18 pm Post subject: Command Buttons |  |
I have two command buttons for clocking In and Out. Everything works great when i pressed the clock in button it recorded the employee id, dept id and time in the fields,but when I tried to press my clock out button it doesn't go back to the last record when I clocked in. I enter the employee id first, units and then clock out . I used the code below but it created another entry and does not clear the form for the next user. Each employee clocks in and out several times a day.
Private Sub Command146_Click() If IsNull(Me.ClockOut) Then Me.ClockOut = Now() DoCmd.GoToRecord , , acAdd Exit Sub End If End Sub |
|