Unanswered: Checking for duplicates using the Next Record button
Another (hopefully simple) Access question from me.
Each of my forms are set up in the following format:
Form Fields (Name, etc)
Navigation buttons (First, Previous, Next, and Last)
Record buttons (Add, Update, and Delete)
I figured out how to display an error message to the user when entering a duplicate and clicking on the Add button by Exporting the Macros to VB, and by adding a DLookup. However, the Next button will allow for the record to be added as well (which I didn't know). Is there anyway to prevent the Next button from adding a duplicate record within the table? The only way I have found so far is by making the field indexed. This is fine except I can't display a nice error message to the user.