Prevent Duplicate Orders

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!
 
T

Tom Lake

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
 
D

DSmith

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?
 

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