EliteDesk@aol.com
Registered User.
- Local time
- Today, 12:34
- Joined
- Sep 11, 2000
- Messages
- 45
I need to open a recordset with a query, but when I used the code below I received "Too Few Parameters. Expected 1" Error Message.
rsReports.Open "Select DISTINCT InspectorID from qryCreatePDFs", conn,
adOpenStatic, adLockReadOnly
due to the following site:
http://support.microsoft.com/default.aspx?scid=kb;en-us;209203
I tried the following...
Dim rsReports As Recordset '<- DAO recordset
Dim qdfMyQuery As QueryDef
Set qdfMyQuery = CurrentDb.QueryDefs("qryCreatePdfs")
qdfMyQuery![Forms!frmCreatePDFs!InspectionDate] = Forms![frmCreatePDFs]![InspectionDate]
Set rsReports = CurrentDb.OpenRecordset("Select DISTINCT InspectorID from qdfMyQuery", dbOpenSnapshot)
BUT getting the following error "Cannot find the input table or query" at Set rsReports =
Any advise would be greatly appreciated. Thanks in advance for your time.
Cathi
rsReports.Open "Select DISTINCT InspectorID from qryCreatePDFs", conn,
adOpenStatic, adLockReadOnly
due to the following site:
http://support.microsoft.com/default.aspx?scid=kb;en-us;209203
I tried the following...
Dim rsReports As Recordset '<- DAO recordset
Dim qdfMyQuery As QueryDef
Set qdfMyQuery = CurrentDb.QueryDefs("qryCreatePdfs")
qdfMyQuery![Forms!frmCreatePDFs!InspectionDate] = Forms![frmCreatePDFs]![InspectionDate]
Set rsReports = CurrentDb.OpenRecordset("Select DISTINCT InspectorID from qdfMyQuery", dbOpenSnapshot)
BUT getting the following error "Cannot find the input table or query" at Set rsReports =
Any advise would be greatly appreciated. Thanks in advance for your time.
Cathi