I have Employee Id and passcode fields and when they press Enter, it will
check if the employee id matches the passcode. If it does, a form will open
with the employee's picture, name, position and the current date and time.
when he press the Enter key again, the form will close and the bundy clock
form will open to accomodate the next employee.
In my table, I have the following fields: Date Worked, Am_In,
Am_Out,Pm_In,Pm_Out. In the morning, when the employee logs on, I have a
macro that sets the value of the Am_in to Time().
It will be a lot simpler if you use a single date/time field to store both the
date and the time - to make searching easier and to prevent problems with
shifts running over midnight. If you had a field EmployeeID, TimeIn and
TimeOut, you could set TimeIn to Now() when they log in (e.g. #8/15/2007
07:44:28#). The logout scenario would have them open a Form based on a query
with their employeeID as a criterion, and IS NULL as the time out field
criterion; this form will (hopefully!) show just one record, the login without
a corresponding logout.
A Query
SELECT Employees.LastName & ", " & Employees.LastName, Bundy.TimeIn
FROM Employees INNER JOIN Bundy
ON Employees.EmployeeID = Bundy.EmployeeID
WHERE Bundy.TimeOUt IS NULL
ORDER BY TimeIn;
will show all employees who have clocked in but not yet clocked out.
You could also have a check on the login form to bring up a warning if someone
tries to log in twice, using the same or a similar query.
John W. Vinson [MVP]