A bit of background.
Trying to automate production of a report with subreport.
I have a single date parameter selected from a form for the report's queries.
I want to use the same date as the parameter for the subreports' query.
The report queries to which the parameter applies are action queries, which I run with the Execute command. The subreport query is a select query, so I need to try to requery the recordset as just setting the recordset after setting the parameter doesn't seem to apply them.
On this page I found some notes on the requery method.
http://www.microsoft.com/technet/prodtechnol/office/office2000/solution/part3/ch16.mspx?mfr=true
Specifically this
I have tested the restartable property of my recordset and it returns true, yet when I try to use the requery method;
either
or
I get an invalid argument error.
Any thoughts?
Trying to automate production of a report with subreport.
I have a single date parameter selected from a form for the report's queries.
I want to use the same date as the parameter for the subreports' query.
The report queries to which the parameter applies are action queries, which I run with the Execute command. The subreport query is a select query, so I need to try to requery the recordset as just setting the recordset after setting the parameter doesn't seem to apply them.
On this page I found some notes on the requery method.
http://www.microsoft.com/technet/prodtechnol/office/office2000/solution/part3/ch16.mspx?mfr=true
Specifically this
When you use the Requery method with DAO, you must first determine if the Recordset object supports the Requery method by checking the value of the Restartable property of the Recordset object. If the value is True, you can refresh the Recordset object's contents by using the Requery method. If the Recordset object doesn't support the Requery method, you must open the Recordset object again with the Open method.
I have tested the restartable property of my recordset and it returns true, yet when I try to use the requery method;
either
Code:
rst.Requery
Code:
With rst
.Requery
End With
I get an invalid argument error.
Run-time error '3001':
Invalid Argument
Any thoughts?