VBA to test and give a message

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
 
D

Douglas J. Steele

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

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top