Code:
Dim MSG As String
If Me.tgl_Empty.Value = False And DCount("*", "qry_Stolen_Cars") > 0 Then
DoCmd.OpenReport "rpt_Stolen_Cars", acViewPreview
ElseIf Me.tgl_Empty.Value = False And DCount("*", "qry_Stolen_Cars") = 0 Then
MSG = MsgBox("Stolen cars report is empty please check the dates or check the empty report toggle", vbOKOnly + vbCritical + vbMsgBoxRtlReading, "Stolen cars database")
ElseIf Me.tgl_Empty.Value = True Then
DoCmd.OpenReport "rpt_Stolen_Cars_Empty", acViewPreview
End If
in my code i have three choices
1- toggle button false query not empty
2- toggle button false query empty
3- toggle button true
in the first choice everything is ok
in the third choice everything is ok
in the second choice the message does not open and nothing happened
what i wrote is to get a message if the choice 2 is chosen
any help
Last edited: