Preventing duplicate part number as idfr

btappan

Registered User.
Local time
Yesterday, 18:10
Joined
Feb 24, 2007
Messages
40
I have a fairly simple database we are using for keeping inventory and new items get added through a form. Is there A way I can prevent a part number and its properties from being entered if that same part number has already been entered at an earlier point in time?
 
Specify an unique index on the PartNumber field in the table.
 
okay, took care of that, but is there a way to make it tell you the part number already exists before proceeding to the next field in the form? The part number is the first field and there are 25 more after that and it would be a real pain to fill in all those fields only to find out its already there. Another option would be something that as you started typing the part number, a list appeared of similar part numbers based on the suffix letters you have already typed or like an Auto complete kind of field. any suggestions? thanks
 
How about using DLookup() or DCount() in the BeforeUpdate event of the control?
 
Have you looked up DLookup() or DCount() in VBA help yet? There are examples in there on how to use them.
 

Users who are viewing this thread

Back
Top Bottom