G
Guest
Here is the SQL...
SELECT punches.[Emp#], punches.Date, punches.I, punches.O
FROM punches
WHERE (((punches.[Emp#])=[Enter Employee Number]));
Im trying to build a timeclock, the employee will enter an Emp# on a form,
the form brings up the query with After Update Properity. The query is
sorted by date and time in asending order (ie latest date and time on the
bottom)
and goes to the last record.
(((DoCmd.OpenQuery "punch qry", acNormal, acEdit
DoCmd.GoToRecord acQuery, "punch qry", acLast)))
Here is where the problem starts, I want the code to evaluate the "Last"
record of the query and determine which field is empty I or O (In and Out)
then go to a new record and punch the current time in the opposite field.
(i.e. if the "Last" record was I the new record would be O)
Any ideas would be helpful!
Thank you!
SELECT punches.[Emp#], punches.Date, punches.I, punches.O
FROM punches
WHERE (((punches.[Emp#])=[Enter Employee Number]));
Im trying to build a timeclock, the employee will enter an Emp# on a form,
the form brings up the query with After Update Properity. The query is
sorted by date and time in asending order (ie latest date and time on the
bottom)
and goes to the last record.
(((DoCmd.OpenQuery "punch qry", acNormal, acEdit
DoCmd.GoToRecord acQuery, "punch qry", acLast)))
Here is where the problem starts, I want the code to evaluate the "Last"
record of the query and determine which field is empty I or O (In and Out)
then go to a new record and punch the current time in the opposite field.
(i.e. if the "Last" record was I the new record would be O)
Any ideas would be helpful!
Thank you!