parameter query and recordset

EliteDesk@aol.com

Registered User.
Local time
Today, 10:00
Joined
Sep 11, 2000
Messages
45
HELP!

I'm trying to output a single report to multiple PDF Files. I have a query qryCreatePDFs, with a date criteria and check box False criteria, it is my reports underlying query. The query is also used as the base of the recordset. I used the code below and received "Too Few Parameters. Expected 1" Error Message.

rsReports.Open "Select DISTINCT InspectorID from qryCreatePDFs", conn,
adOpenStatic, adLockReadOnly

and according to the following site:
http://support.microsoft.com/default.aspx?scid=kb;en-us;209203

you need to use a parameter query then I tried the following...

Dim qdfMyQuery As QueryDef

Set qdfMyQuery = CurrentDb.QueryDefs("qryCreatePdfs")

Set rsReports = CurrentDb.OpenRecordset("Select DISTINCT InspectorID from qdfMyQuery", dbOpenSnapshot)

BUT getting the following error "Cannot find the input table or query"

Any advise would be greatly appreciated. Thanks in advance for your time.

Cathi :)
 

Users who are viewing this thread

Back
Top Bottom