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
 
Ad

Advertisements


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

Command Button 0
Command Button 5
command buttons 2
Command Button 2
command button 2
Command Button 6
Command Button 2
Command Button 3

Top