Command Buttons

M

mjk

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Time Clock 6
Dynamic Naming of Form Button 3
I figured out the issue thank you. 0
Program buttons to create a word document 0
Time clock 2
time clock 3
VBA word change keys 0
clocking in and out on jobs 1

Top