Hi all. Here's my plan - when a user skips over a field in a form, the script should pop up an error message and then return the focus to the control that was skipped. I tried:
Private Sub CompanyAgency_LostFocus()
If IsNull(Forms!Contacts!CompanyAgency) Then
NameNull = MsgBox("Please Enter the Company or Agency Name", vbOKOnly, Error)
but the focus will only stay in the control for a fraction of a second, and then move on to wherever the focus was when the event was first called. Any ideas? The code works fine if I set the focus to a control other than the one that the event is linked to, but that doesn't help me.
Thanks for the reply. Unfortunately, I completed hosed the whole database shortly after I posted (don't know how - if I did, I'd be much happier) and I'm in the process of rebuilding it. Once I get to that part again, I'll give your suggestion a try.