Morning chaps
I have another query regarding recordsets and reports in Access 2003.
I have a report linked to a query. When the report opens, I want to use some VBA behind the scenes to interrogate its recordset. I’ve done this before without difficulty by opening a report’s query as a recordset in its On Open or On Activate event, eg:
I tried to be smart with:
...but I got:
Any ideas?
Thanks,
John
I have another query regarding recordsets and reports in Access 2003.
I have a report linked to a query. When the report opens, I want to use some VBA behind the scenes to interrogate its recordset. I’ve done this before without difficulty by opening a report’s query as a recordset in its On Open or On Activate event, eg:
Trouble is, this particular report’s query takes a parameter from the user, so opening it as a Recordset fails because it needs a parameter. So basically I want to access the report’s recordset directly.Set rst = CurrentDB.OpenRecordset(“[name of my report’s query]”)
…blah blah…
rst.Close
I tried to be smart with:
Set rst = CurrentDB.OpenRecordset(Me.Recordset)
...but I got:
Run-time error '2593':
This feature is not available in an MDB
Any ideas?
Thanks,
John