Time clock

M

mjk

Hello
Here's my problem...I created a database that keeps track of
employees date,time units.What I want is to create a form for the employee
to enter their employee id and clock in or out button. When they clock in,I
want the date and time recorded to DateIn and when they clock out I want the
date and time recorded to DateOut and also have something to pop out to enter
the units. Could someone help me with this issue or is this possible?
 
P

pietlinden

Hello
      Here's  my problem...I created a database that keeps track of
employees  date,time units.What I want is  to create a form for the employee
to enter their employee id and clock in or out button. When they clock in,I
want the date and time recorded to DateIn and when they clock out I want the
date and time recorded to DateOut and also have something to pop out to enter
the units. Could someone help me with this issue or is this possible?

You could do something like this:
have two textboxes, one for TimeIn (txtTimeIn) and TimeOut
(txtTimeOut).
Then have one button for Clock In/out. And set the value of txtTimeIn
or txtTimeOut as appropriate.

Private Sub cmdClockInOut_Click()
If IsNull(Me.TimeIn) Then
Me.TimeIn = Now
ElseIf IsNull(Me.TimeOut) Then
Me.TimeOut = Now
Else
MsgBox "Record already filled in!"
End If
End Sub

Note: TimeIn and TimeOut are formatted as general date, so you can use
a datestamp...
 
M

mjk

Thanks for the reply but I'm still confused...Could you be more specific? I
tried your suggestions and it does not work or maybe I'm doing something
wrong here.
I have a table called Time clock.
EmployeeID
DeptID
ClockIn
ClockOut
Units
I created a form for all the employees to enter their
EmployeeID,DeptID,ClockIn,ClockOut and Units. What I want to know is how to
create a command button when an employee clocks in,the date and time is
automatically recorded in the clock in field. When an employee clocks out I
want it to do the same thing but at the end of their shifts, they need to
enter their units. Is it possible also when they press clock out, another
form will pop up to enter their units? Please advise...
 

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


Top