Prevent Duplicate Orders

  • Thread starter Thread starter DSmith
  • Start date Start date
D

DSmith

Is it possible to prevent a duplicate order for each customer?
The field name is OrderID and I would like each customer to be able to order
any product only once.

Thanks!
 
DSmith said:
Is it possible to prevent a duplicate order for each customer?
The field name is OrderID and I would like each customer to be able to
order any product only once.

Make OrderID a Primary Key field and Access won't allow duplicates.
To do that, go into Design mode for the table in question, highlight the
OrderID field and click the key icon at the top of the design window.
If there's already a duplicate record in the table, you won't be able to
save your change. In that case, exit design mode, delete duplicate
records then go back to design mode and follow above instructions.

Tom Lake
 
Unfortunately, that won't work. Because I need duplicate records for the
table just not for each customer. If I have 20 customers they can all order
M1 but I don't want anyone to order it twice. Any other ideas?
 
Back
Top