I have two fields on a form which passes the user-entered data from only one of the fields to a query in a report. I only want the user to enter data into one field. If they enter data into both fields, I want it to display an error message, something like, "Please only enter info into one of the boxes below."
I know of the function "IsNull". Is there something equivalent that will tell me if something is not blank or zero?
The following is obviously incorrect, I just wanted to give an example of what I am trying to do.
============
Private Sub Preview_Click()
If [Box1] IS NOT NULL Then
MsgBox "Only enter info into one box."
DoCmd.GoToControl "Box1"
End If
============
Thanks.
I know of the function "IsNull". Is there something equivalent that will tell me if something is not blank or zero?
The following is obviously incorrect, I just wanted to give an example of what I am trying to do.
============
Private Sub Preview_Click()
If [Box1] IS NOT NULL Then
MsgBox "Only enter info into one box."
DoCmd.GoToControl "Box1"
End If
============
Thanks.