My table has two fields used as the key, ContactLastName and CompanyName. If the user attempts to add a duplicate record using my form I would like a custom error message to display and the record not added to the table.
I tried following advice given for a previously asked question in this forum and added code to the end of my BeforeUpdate procedure but got an error message indicating it was interpreting the value in ContactLastName as an expression or fieldname, which didn't fly.
I have code in that procedure that performs validation edits on required fields. I put the above described code after those edits. Was I on the right track? Can you help me with the code I need?
Much thanks.
I tried following advice given for a previously asked question in this forum and added code to the end of my BeforeUpdate procedure but got an error message indicating it was interpreting the value in ContactLastName as an expression or fieldname, which didn't fly.
I have code in that procedure that performs validation edits on required fields. I put the above described code after those edits. Was I on the right track? Can you help me with the code I need?
Much thanks.