Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

UnLoad Event and Primary Keys

Status
Not open for further replies.

ChemistZ

Programmer
Oct 30, 2001
70
US
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?
 
Have you tried:

If IsNull(Me.County_NO) OR Me.County_NO = "" Then .....
Jim Lunde
compugeeks@hotmail.com
We all agree that your theory is crazy, but is it crazy enough?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top