Duplicate items

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a purchase order database. On the order form, users can add products
from a products table to their order. If, for some reason, they need to add
a product twice to an order, it comes up with an error about adding
duplicates to the table. Is there a way around this to allow a user to add a
prodcut twice to an order? Please Help!

Thanks!
 
You can trap the error, but a more elegant way si to limit what they can
add. For example, if you are using a combo box to add the items (as in
NWind), you could have it populated by a quert that has a Not In (Select
Product ID from ItemsOrdered where customerID = Forms!FormName!customerID)
 
I do have a combo box for the products that has the query behind it. If it
isn't in the list, it asks the user if they want to add it. How can I allow
it to be able to use the same product twice in one purchase order?

Thanks!
 
Are you using a traditional HeaderTable, Detail Table model for your POs? If
not, you should be. If you are, then the product field in the Detail should
not require unique values.
 
Back
Top