VBA to test and give a message

M

Moe

I do not know VBA . In my form when I click on Print or Preview buttons I
need the status of a specific field (which is a combobox in the subform) to
be tested. If that field is null then a message box should tell the user to
select one item in that combobox if it is not null then it should continue
with the normal operationof that button.
Thanks
 
D

Douglas J. Steele

If IsNull(Me.NameOfField) Then
MsgBox "The field is empty"
Else
' whatever code was already there
End If
 
Top