Validation on form

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.
 
R

Rick B

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.
 
D

D

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.
 
R

Rick B

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.
 

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