Check if record exists

  • Thread starter Thread starter RobertG
  • Start date Start date
R

RobertG

Hi All,

It seems like this subject is a popular one, but I can't seem to find a
solution that would work with my situation. What I want to do seems fairly
simple enough, yet I just can't find a way to do it.

Basically, I have a query, qryLate, that shows people who have not completed
their training on time. Once they complete their training, they are no
longer displayed on this list, so I would like to append their info to a
table, tblLate, to keep a historical record. I have tried basing an append
query on qryLate, but am having much difficulty trying to check if the record
already exists.

My append query, and tblLate, only have 5 fields: StaffID, TrainingTypeID,
SupervisorID, OfficeChiefID, and DueDate.

I have tried setting a multifield index for these 5 fields in tblLate, but
it is not stopping duplicate entries from being appended. Most of the
solutions I have seen for this problem involve checking some value on a form;
since none of my objects utilize a form, is there another way to do this?

Feel free to ask any questions/for additional info and I will be happy to
supply!

As always, your help is greatly appreciated!

Robert
 
RobertG,
You already have a field called DueDate for the date the training is due.
Create another field called DateTrainingCompleted.
When you want to find who was late with their training, you can just compare
the dates.
Anyone with their DateTrainingCompleted later than the DueDate or with a
null for DateTrainingCompleted is late.
Once a person completes their training, you have their DateTrainingCompleted
and can always find who was late without going to the bother of an extra
table for historical records.


Jeanette Cunningham -- Melbourne Victoria Australia
 
Back
Top