Comparing previous records

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I created a form with a subform for tracking student's time spent in various
activities. the subform is tied to a table with an auto number for events,
because one student often does more than one activity each day, so date is
not a good primary key. The question is now how can i compare a new record
entry to a previous one to reduce overlap of times ? For instance if one
person logs a student in at 11 15 on one date, how can i compare the date and
time to see if the new record conflicts with another record for the same date?
 
Dan

If you record the Date/Time value (e.g., using Now()), you can compare the
date-only portion (using DatePart()) of that field from two records.

--
Regards

Jeff Boyce
<MS Office/Access MVP>

Dan Robles said:
I created a form with a subform for tracking student's time spent in various
activities. the subform is tied to a table with an auto number for events,
because one student often does more than one activity each day, so date is
not a good primary key. The question is now how can i compare a new record
entry to a previous one to reduce overlap of times ? For instance if one
person logs a student in at 11 15 on one date, how can i compare the date and
time to see if the new record conflicts with another record for the same
date?
 
Back
Top