I am asked to modify a form & report to allow for the selection of a client. There are functions already built in this already huge form so I would like to use what is already there. I am getting errors telling me that the report isn't opened or is misspelled. This error occurs on the Filter. I realize that I am referring to the report before its opened but I am not sure how else to do this. Here is what I have:
strRPT = "rptComprehensiveRevenueSummary_byClient"
Select Case [optCLIENT]
Case 1 'ALL Clients...
Case 2 'Single Client...
strFILTER = [Reports]![rptComprehensiveRevenueSummary_byClient]![ClientID] = [Forms]![frmHubReports]![cmbClientNumber] And ""
Case 3 'Negotiation Clients...
strFILTER = [Reports]![rptComprehensiveRevenueSummary_byClient].[ARTypeID] = 8
Case 4 'Multiple Clients...
strFILTER = [ClientPrint] = -1
End Select
DoCmd.OpenReport strRPT, acViewPreview, strFILTER
End
strRPT = "rptComprehensiveRevenueSummary_byClient"
Select Case [optCLIENT]
Case 1 'ALL Clients...
Case 2 'Single Client...
strFILTER = [Reports]![rptComprehensiveRevenueSummary_byClient]![ClientID] = [Forms]![frmHubReports]![cmbClientNumber] And ""
Case 3 'Negotiation Clients...
strFILTER = [Reports]![rptComprehensiveRevenueSummary_byClient].[ARTypeID] = 8
Case 4 'Multiple Clients...
strFILTER = [ClientPrint] = -1
End Select
DoCmd.OpenReport strRPT, acViewPreview, strFILTER
End