VBA to test and give a message

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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
 
If IsNull(Me.NameOfField) Then
MsgBox "The field is empty"
Else
' whatever code was already there
End If
 
Back
Top