Preventing duplicate entries in text fields

  • Thread starter Thread starter Jim
  • Start date Start date
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.
 
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.
 
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
 
Back
Top