VBA newbie, using Access 2000,
Trying to tie a cmdbutton to a list box,
the user selects which report they want to run from a list box, then clicks a cmnd button to launch the report, OR they will click another cmd button to launch a pdf.
I keep getting an error when the if is true "runtime error 2497, The action or method requires a Report Name Argument."
I'm at a loss, (I am going to make this a case statement once I figure it out)
Any help would be greatly appreciated. Thanks Ron
Private Sub Command35_Click()
If List31 = 9 Then
DoCmd.OpenReport rptHistorical23, acViewPreview
End If
End Sub
Trying to tie a cmdbutton to a list box,
the user selects which report they want to run from a list box, then clicks a cmnd button to launch the report, OR they will click another cmd button to launch a pdf.
I keep getting an error when the if is true "runtime error 2497, The action or method requires a Report Name Argument."
I'm at a loss, (I am going to make this a case statement once I figure it out)
Any help would be greatly appreciated. Thanks Ron
Private Sub Command35_Click()
If List31 = 9 Then
DoCmd.OpenReport rptHistorical23, acViewPreview
End If
End Sub