Preventing duplicate entries in text fields

J

Jim

I have a form that includes two text fields orscasenumber
and ss# that I want to give an error message if a
duplicate entry is entered in either of these fields.
Thanks in advance for anyu help.
 
J

Jim

Thanks, but I did index both fields in the table. If I
close the form after entering the information, I will get
an error message. If I use the close command button, the
information will not be added to the fields and thereis
not any error messages.
 
D

Dave Elliott

You could use a simple macro to accomplish the duplicate problem. The
example checks for a duplicate customer.
Modify to your liking. This is used on the before update event. Hope this
helps.

DLookUp("[Customer ID]","[Customers]","[Customer ID] = Form.[Customer ID] ")
Is Not Null
 

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