Check for Duplicate Invoice Number

D

Dave Elliott

I have a form named TimeCards where I enter Customer,Time,Vendor and Hour
information. On the form is a field named Repair Order Number.
This field is for matching the same Invoice Number as the form Categories
and Products.
The table that the form TimeCards is based on is Time and the table that the
Invoice number is based on is Customers.
The Time table has a field named Repair Order Number and the table Customers
has a field named Customr ID
These must match. I want the form TimeCards on the field Repair Order Number
to check the table Customers (Customer ID) for a duplicate ID, that is a
duplicate Customer ID befor continuing on with the TimeCards form updating
the record.
I tried this code to make it work on the before update event of the field
Repair Order Number field on the TimeCards form.

DLookUp("[Order ID]","[Orders]","[Order ID] = Form.[Order ID] ") Is Not Null


What am I doing wrong ?

Thanks,

Dave
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top