Good Morning. I have a table where a composite Primary Key is used based upon a unique Date and Location being entered. I want to check the table to make sure the Date and Location haven't been entered already while the user enters data (After Updating the Location).
If they enter the date, then select a location that has that date already entered, I'd like to warn them, roll-back the record they are entering (to avoid the generic Access duplicate PK error) and take them to the record.
I have the check working and the code to take them to the record but am not sure how to clear the record they've entered thus far before taking them to the existing record.
Is there code that will roll the entry back without stopping the code before taking the user to the existing entry?
Thanks, Damon
If they enter the date, then select a location that has that date already entered, I'd like to warn them, roll-back the record they are entering (to avoid the generic Access duplicate PK error) and take them to the record.
I have the check working and the code to take them to the record but am not sure how to clear the record they've entered thus far before taking them to the existing record.
Is there code that will roll the entry back without stopping the code before taking the user to the existing entry?
Thanks, Damon