M
Mike W
I have been trying to find a way to run a stored query for a report without
displaying the query. I've tried using the OpenRecordset method in VBA
without success. I would appreciate some direction.
The following code returns an error "To few parameters. Expected 1"
Dim db As Database
Dim strSQL As String
Dim rst As Recordset
Dim stDocName As String
Set db = CurrentDb
Set rst = db.OpenRecordset("CrReportQry")
stDocName = "Report1"
DoCmd.OpenReport stDocName, acViewPreview
Thanks,
Mike
displaying the query. I've tried using the OpenRecordset method in VBA
without success. I would appreciate some direction.
The following code returns an error "To few parameters. Expected 1"
Dim db As Database
Dim strSQL As String
Dim rst As Recordset
Dim stDocName As String
Set db = CurrentDb
Set rst = db.OpenRecordset("CrReportQry")
stDocName = "Report1"
DoCmd.OpenReport stDocName, acViewPreview
Thanks,
Mike