Hello- I have several subforms within one form. Each subform has code in it that alerts the user that he/she did not fill in a required field - example follows:
If IsNull(Me.X) = True Then
MsgBox "Click on Intensity level."
Me.y.SetFocus
Me.x.SetFocus
End If
The problem here is that if the user fails to fill in any given field, then all of the messages from all of the subforms pop up. How can I rewrite the above to limit the error message to just the current control on the current form?
If IsNull(Me.X) = True Then
MsgBox "Click on Intensity level."
Me.y.SetFocus
Me.x.SetFocus
End If
The problem here is that if the user fails to fill in any given field, then all of the messages from all of the subforms pop up. How can I rewrite the above to limit the error message to just the current control on the current form?