G
Guest
I've got a subroutine that identifites a couple of strings depending on info
that the user has entered.
This is the beginning of that subroutine:
Dim strDataSource As String
Dim strReportName As String
Dim strLabelName As String
Select Case Me.txtReportType
Case "All Adults"
strDataSource = "qryContactsAll"
strReportName = "rptContacts"
strLabelName = "lblContacts"
(There are 13 or 14 cases in all).
Then I've got another subroutine that is supposed to run that sub & then
open a report based upon the strReportName. I've got the following command
line in there:
DoCmd.OpenReport strReportName
I get a Run-time Error '2497": The action or method requires a Report Name
argument.
Any suggestions on how to get this working?
Thanks.
that the user has entered.
This is the beginning of that subroutine:
Dim strDataSource As String
Dim strReportName As String
Dim strLabelName As String
Select Case Me.txtReportType
Case "All Adults"
strDataSource = "qryContactsAll"
strReportName = "rptContacts"
strLabelName = "lblContacts"
(There are 13 or 14 cases in all).
Then I've got another subroutine that is supposed to run that sub & then
open a report based upon the strReportName. I've got the following command
line in there:
DoCmd.OpenReport strReportName
I get a Run-time Error '2497": The action or method requires a Report Name
argument.
Any suggestions on how to get this working?
Thanks.