Prevent Duplicates in Form Fields??

J

jwr

I created a form from a query based upon order details. My order may have
more than 1 line item of products purchased. I want there to be only 1 form
per order rather than 1 form per line item.

How do I prevent duplicates???

Thanks in advance
 
J

John Vinson

I created a form from a query based upon order details. My order may have
more than 1 line item of products purchased. I want there to be only 1 form
per order rather than 1 form per line item.

How do I prevent duplicates???

Thanks in advance

I don't think I understand the question. What do you mean by "1 form
per order"?

Have you looked at the Orders form in the Northwind sample database?
It has a mainform based on the Order table, with a *continuous*
Subform based on OrderDetails - showing one ordered item per line. Is
that what you're trying to do?

None of this has anything to do with preventing duplicates, though.
The best way to do so is to put appropriate Indexes on the tables. If
you have a unique two-field index on OrderID and ItemID in the
OrderDetails table, you will be prevented from ordering the same item
twice in the same order.

John W. Vinson[MVP]
 
J

jwr

"1 Form per order" -- this form has been created to display orders that are
unshipped. It is based upon the Customer Orders, where there may be more
than one line item. I only want to see the customer one time per order
rather than one time per line item.

My form contains the following: Customer ID, Customer Name, and Order Date.
The criteria is that the order has not been shipped.

I have not looked at Northwind. I just learned how to get to that database.
I will look at it today.

The idexes in the table field will not work since our customers require that
the invoice to them read exactly as their order is written. This may be the
same item listed 3-4 times rather than ordering one item in quantity of 3-4.
 

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