I have a table with a primary key composed of two fields (Name and Class). I have a form that allows me to select a Name and then view all the classes they have attended. I can edit these classes or add new ones. In the Class field, if I type in a class that already exists for that name, I want to catch it in the BeforeUpdate(Cancel As Integer) sub. How can I do this?
I know that access will automatically generate a warning box but because of other message boxes and buttons that would exit the form (giving the user the impression that the record was saved when it was not) I need to be able to catch this in the BeforeUpdate section.
I know that access will automatically generate a warning box but because of other message boxes and buttons that would exit the form (giving the user the impression that the record was saved when it was not) I need to be able to catch this in the BeforeUpdate section.