I have a tblContacts table including the fields: ID, Full Name, Mobile (format text)
And a NewContact form including the textboxs: ID, Full Name, Mobile
How to Prevent Duplicate mobile from being entered into NewContacts form ...
I'm using the code below:
Code:
DLookUp("[Mobile]","tblContacts","[Mobile] = '" & [Forms]![NewContact]![Mobile] & "' and [CustID] <>" & [Forms]![NewContact]![ID]) Is Null
but have error message:

Or: (but error the sames)
- In the Navigation Pane, right-click the table that contains the field, and then click Design View.
- Select the field that you want to make sure has unique values.
- In the Field Properties pane, on the General tab, set the Indexed property to Yes (No duplicates).
Many thanks,