Validation on form

  • Thread starter Thread starter D
  • Start date Start date
D

D

I want to check data in the textbox that feeds a primary
key field right after the value is entered instead of
getting an error when the record is attempting to save.
 
Use the data validation rule, or use some code in the field's AfterUpdate
event.

Rick B

I want to check data in the textbox that feeds a primary
key field right after the value is entered instead of
getting an error when the record is attempting to save.
 
I should have been more clear. How do I check for
duplicate records, ie;Part# already exists in tblParts.
My VBA skills are fairly limited so I appreciate the help.
 
I have seen this asked several times. You might do a search.

Basically, as the user exits the field, you must do a DLOOKUP to see if the
table already has a record. If it does, then you can issue an error.

Unfortunately, I can't help you with the details, but if you do a bit of
searching you should come up with it. I know I have seen it at least twice
in hte last week.

Rick B


I should have been more clear. How do I check for
duplicate records, ie;Part# already exists in tblParts.
My VBA skills are fairly limited so I appreciate the help.
 
Back
Top