I need to prevent a user from duplicating an entry in MS Access. I would like the app. to check for an exact match and if it finds one warn the user. Ideally the warning will not allow the user to enter the duplicate data. I have a query that will identify the duplicates after they are entered, but need to prevent the actual entry. Entry to the main data table is being performed by an append query. The user copies data from an Excel spreadsheet and paste it into a temporary table. Then clicks a control that appends it to the data table. Several fields must match to determine if it is a duplicate entry.
EmpID Date ErrorCd
In other words if that employee committing that error on that date already existed an additional entry for the same employee on the same date with the same error code would be a duplicate. The same employee could commit a different error for the same date though without it being a duplicate