I have a command button in my form to open the report.
If i write one line, for example
DoCmd.OpenReport “a1”, acViewPreview, , “Afid = ” & Me.office
Then the report is opened.
However, if i write the following ElseIf condition:
If Me!office = True Then
DoCmd.OpenReport “a1”, acViewPreview, , “Afid = ” & Me.office
ElseIf Me!office = False Then
DoCmd.OpenReport “a1”, acPreview, , “”
End If
Then nothing happens after the click. What happens with my command?