If have the following code in a public module
Basically if the user moves out of form2 (presented as a subform of form1) then the focus is set back to "Description" in form2 with the message box alert.
The problem is the MsgBox is preventing the focus from working properly. The focus goes to "Description" but after clicking "OK" on the MsgBox, the focus goes to where the user clicked instead of staying in "Description".
Any ideas how I can resolve this?
Thanks
Code:
Sub RunValidate()
If IsNull(Form_Form2.Description) = True Or Form_Form2.Description = "" Then
Form_Form2.Description.SetFocus
MsgBox ("Please enter a description for your item(s)")
End If
End Sub
Basically if the user moves out of form2 (presented as a subform of form1) then the focus is set back to "Description" in form2 with the message box alert.
The problem is the MsgBox is preventing the focus from working properly. The focus goes to "Description" but after clicking "OK" on the MsgBox, the focus goes to where the user clicked instead of staying in "Description".
Any ideas how I can resolve this?
Thanks