maybe something like this:
Option Compare Database
Option Explicit
Private Sub btn_make_report_Click()
If Me.Combo0 = "" Or IsNull(Me.Combo0) Then
If Me.Combo1 = "" Or IsNull(Me.Combo1) Then
MsgBox "You must complete both combo boxes before the report can
be produced", vbExclamation
Exit Sub
End If
End If
'if the code gets this far due the combo boxes being populated properly
it will generate the report
'eg
DoCmd.OpenReport "myreport", acViewNormal
End Sub
KP said:
I have a report that should be based on the values in 2 combo boxes, that
are not from any table. When I press the button to run report, i want to
display a message that says 'You need to enter both parameters' and then not
proceed. Can anyone tell me how to do this?