Hi,
I'm trying to loop through the records resulting from a parameter select query that is used as the record source for an access report. Thus, I tried to retrive the recordset resulting from the parameter select query (named query1). I used:
Dim dbs As Database, rst As DAO.Recordset
Dim qdf As QueryDef
Set dbs = CurrentDb
Set qdf = dbs.QueryDefs("query1"
set rst = qdf.openrecordset
I got the error "Too few parameters. Expected 1"
The same error was generated when I used:
Dim dbs As Database, rst As DAO.Recordset
Set dbs = CurrentDb
set rst = qdf.openrecordset("query1"
Any idea about the reason for the error??
Thanks.
I'm trying to loop through the records resulting from a parameter select query that is used as the record source for an access report. Thus, I tried to retrive the recordset resulting from the parameter select query (named query1). I used:
Dim dbs As Database, rst As DAO.Recordset
Dim qdf As QueryDef
Set dbs = CurrentDb
Set qdf = dbs.QueryDefs("query1"
set rst = qdf.openrecordset
I got the error "Too few parameters. Expected 1"
The same error was generated when I used:
Dim dbs As Database, rst As DAO.Recordset
Set dbs = CurrentDb
set rst = qdf.openrecordset("query1"
Any idea about the reason for the error??
Thanks.