The ID is stored in a table called Main Table. It has two columns, employee
name and login id. There are then 4 additional tables that record the time &
date when the employee punches in for the day, out for lunch, in from lunch &
out for the day. The form that they clock in has 4 buttons for punching in.
I initially wanted only the 4 buttons on the main form, but I had to put the
id # because otherwise I was not able to tell who was clocking in or out.
I hope I'm not rambling and this makes sense.
Hmmm... do you have *separate tables* for the four timeclock events?
That would not be the best design, in my opinion!
I'd suggest two tables:
Employees
EmployeeID
LastName
FirstName
<other bio data, department assignment, job title, etc>
Note that it's best to store names as two (or three, for middle names)
fields rather than one, and to store some additional information in
case two employees happen to have the same name. I once worked with
Dr. Lawrence David Wise and his colleague, Dr. Lawrence David Wise.
TimePunch
EmployeeID
PunchEvent Text
PunchTime Date/Time
PunchEvents
PunchEvent Text <e.g. "Start Of Day", "Out To Lunch", "In From
Lunch", "Out For Day", "Went Home Sick", <etc>
Have a Form based on Employees; put a Combo Box on the form using the
Combo Wizard "Find a Record" option to navigate to a particular
employee's record. Use a Subform based on TimePunch. With the
EmployeeID as the Master/Child Link Field, and a Default property of
Now() on PunchTime, all the user need do is select their name from the
combo, select the event from the subform combo, and exit the form.
John W. Vinson[MVP]
Join the online Access Chats
Tuesday 11am EDT - Thursday 3:30pm EDT
http://community.compuserve.com/msdevapps