combination error

basilyos

Registered User.
Local time
Today, 13:40
Joined
Jan 13, 2014
Messages
256
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:
It's done

I change the default value of toggle button to false instead of nothing

Thanks all
 

Users who are viewing this thread

Back
Top Bottom