Hello,
I create a New QueryDef and when the Query exists, I try to base a recordset on it with the usual code:
Set MyNewRecordset = MyJustCreatedQueryDef.OpenRecordset(type,options,etc)
But I keep getting the error that there are "too few parameters. Expected 11". Is it not an ordinary thing to do, to base a recordset on a QueryDef?
The way around it, I found was to make the QueryDef be a MAKE TABLE SQL and then the Recordset could be based always on the TABLE that the QueryDef created. This is using a lot of time as the table has to be deleted each time etc.
It'd be a whole lot easier if I could just base the recordset on the QueryDef. I wonder would some good soul be able to shed some light on this.
I'm using Access97, by the way. But in Access 2000 the error message is similar: "too few parameters, expected 1".
What am I doing wrong?
Maria
I create a New QueryDef and when the Query exists, I try to base a recordset on it with the usual code:
Set MyNewRecordset = MyJustCreatedQueryDef.OpenRecordset(type,options,etc)
But I keep getting the error that there are "too few parameters. Expected 11". Is it not an ordinary thing to do, to base a recordset on a QueryDef?
The way around it, I found was to make the QueryDef be a MAKE TABLE SQL and then the Recordset could be based always on the TABLE that the QueryDef created. This is using a lot of time as the table has to be deleted each time etc.
It'd be a whole lot easier if I could just base the recordset on the QueryDef. I wonder would some good soul be able to shed some light on this.
I'm using Access97, by the way. But in Access 2000 the error message is similar: "too few parameters, expected 1".
What am I doing wrong?
Maria