I have a form in which I have put validation code into the UnLoad event. I am noticing something odd and wanted to know if anyone could help me with this. When I use code like If isnull(COUNTY_NO) then
MsgBox "blah blah blah"
Cancel=True
for fields that are not included in the primary key I have no problem with this code working properly but if I use the above code lines and it is checking for a field that is included in the key (by the way this form is built off of a table that has three fields making up the key) it does not even hit the lines instead it drops to the else clause which closes the form. I need it to stop and check the key to see if someone has purposely deleted information in any of these three fields. Can anyone explain or help?
MsgBox "blah blah blah"
Cancel=True
for fields that are not included in the primary key I have no problem with this code working properly but if I use the above code lines and it is checking for a field that is included in the key (by the way this form is built off of a table that has three fields making up the key) it does not even hit the lines instead it drops to the else clause which closes the form. I need it to stop and check the key to see if someone has purposely deleted information in any of these three fields. Can anyone explain or help?