This code segment opens a report with the name "rpQtr-Performance150930QTR-ex" and needs to test the value of a textbox on the Report to determine whether to print the report. The "If Reports!..." statement doesn't appear to be working. I halted execution and stepped thru the code to confirm that VB doesn't recognize the format I used.
When I test it in the Immediate window, I get the error: "You entered an expression that has no value"
DoCmd.OpenReport QtrNonBillableReportName, acViewPreview, , "HHID = " & ClientNowPrintingDoCmd.RunCommand acCmdPreviewFourPages
If PauseBeforeClosingSection Then MsgBox ("Proceed")
If Not ViewOnly Then
If Reports![rpQtr-Performance150930QTR-ex].txtQTRbegin <> 0 And Me!txtQTRbegin <> 0 Then
Totalpages = Reports(QtrNonBillableReportName).Pages
DoCmd.PrintOut acPages, 2, Totalpages - 1, acHigh