S
Seren
I have a form with a subform that I've been working on for a while. If the
Tool Number in the subform is left blank, the record for the job (main form)
is saved with the first entry in the table the subform is linked to. I would
rather have a message box pop up alerting the user they must enter a tool
number and then set focus in the tool number field on the subform. I am not
really sure where to put this or if that would solve my problem. (It sounds
like it will... but that doesn't always mean anything.)
Here's the code I have for now:
If IsNull(ToolNum) Then
MsgBox ("You must enter a tool number to save this record.")
ToolNum.SetFocus
End If
I have this at the beginning of my Add_Click sub, but that does not seem to
be what's working for me. any suggestions?
Thanks a bunch!
seren
Tool Number in the subform is left blank, the record for the job (main form)
is saved with the first entry in the table the subform is linked to. I would
rather have a message box pop up alerting the user they must enter a tool
number and then set focus in the tool number field on the subform. I am not
really sure where to put this or if that would solve my problem. (It sounds
like it will... but that doesn't always mean anything.)
Here's the code I have for now:
If IsNull(ToolNum) Then
MsgBox ("You must enter a tool number to save this record.")
ToolNum.SetFocus
End If
I have this at the beginning of my Add_Click sub, but that does not seem to
be what's working for me. any suggestions?
Thanks a bunch!
seren