I have two checkboxes on my form. What I'm trying to do is if the checkbox is checked, a related field must have an entry. One checkbox is bringing up the msgbox, the other is not.
First code works:
Second Code only works if the And... is left off
Like I said, if I take the -- And PhoneListName = "" off, it works.
What could be the difference?
Thx
Jason
First code works:
Code:
Private Sub CkSAOntwkPOC_AfterUpdate() If CkSAOntwkPOC = -1 And Pref_DSN = "" Then Cancel = True MsgBox "this record..." Pref_DSN.setfocus end If End Sub
Code:
Private Sub CkDTSPO_AfterUpdate() If CkDTSPO = -1 And PhoneListName = "" then Cancel = True MsgBox "This record requires..." PhoneListName.setfocus End If End Sub
What could be the difference?
Thx
Jason
Comment