Preventing Duplicates

Zippersabrat

Blah Blah Blah :o)
Local time
Yesterday, 21:35
Joined
May 5, 2010
Messages
31
I am setting up a supply ordering db. Employees will be able to enter items into the order list and then when the items are entered onto a purchase order (separate set of tables) the item is deleted off the order list (I figured this out already). I am trying to come up with a way to use a custom msgbox to inform the employees that an item is already on the list so I do not have a bunch of repeats. I have already prevented repeats by setting the relationship as one-to-one with the ItemList table but it gives a confusing, to less knowledgeable users, warning message.

I put this here because, based on my admittedly limited knowledge I believe this is best done at the form level.

Any help would be greatly appreciated.

Thanks a bunch!

Peggy
 
You could put some code in the before update method that checks to see if the thing that is about to be added is already in the table. You could also try adding a unique constraint to the table. That will not allow users to add duplicate values. You can add the unique index across multiple fields.
 

Users who are viewing this thread

Back
Top Bottom