Disconnected recordset as Report Source
Using VBA in Access 2007, I've opened a connection, created an ADO recordset, and closed the connecton. Now I need to use the recordset as the source to populate a report. (Display only, no edits). Populating a form this way is easy, after disconnecting the recordset I just set the controlsource for each control on the form to the name of a field in the recordset. That's not working for a report.
Code opens the report in design mode, hidden, but on trying to bind report fields to recordset field names I get error 2465 - can't find the field. Double/Triple-checked spelling and that's not the issue.
reportname.recordset is not available because I'm not using an ADP.
Can anyone explain the syntax to accomplish binding a report to a disconnected ADO recordset in VBA without resorting to temp tables?
|