check for duplicates on a form (1 Viewer)

lipin

Registered User.
Local time
Today, 20:11
Joined
May 21, 2002
Messages
149
I have a form with 2 unbound textboxes. One is date and one is Department. Also have a subform based on the department selected on the main form.
Is there a way to save the date and department in a table and if say the report has already been run for the Shipping department for a certain day then it can't be run again for that day?

So if Shipping was ran once on 11/19/03 then if a user tried to select shipping on the main form and entered 11/19/03 that I could give an error message?

I can do the error message and create a table to store the department and date info. But how would I go about checking it to see if it already exists for the same day?
 

dcx693

Registered User.
Local time
Today, 15:11
Joined
Apr 30, 2003
Messages
3,265
The simplest way would be to use a Dlookup function to see if the combination of dept and date already exists in the table.
 

Users who are viewing this thread

Top Bottom