I have 1 button, cmdPreviewRpt
I have 2 option buttons, 1)optTCHistory and 2)optBenefits
I want cmdPreviewRpt to open a report that is determined by the choice of either optTCHistory or optBenefits.
I have the following code but it returns the message “You entered an expression that has no value”. WHY? What have I done wrong? Please help.
If Me!optTCHistory = 1 Then
DoCmd.OpenReport “rptEmployee”, acViewPreview, “”, “”, acNormal
Else
If Me!OptBenefits = 1 Then
DoCmd.OpenReport “rptEmployee Benefits”, acViewPreview, “”, “”, acNormal
End If
End Sub
Basically, if the user selects TCHistory then the History Report opens, if the user selects TCBenefits, the the Benefits report opens.
Thanks ….
Roberta Newton