Link to home
Start Free TrialLog in
Avatar of ibeling
ibeling

asked on

binding a ADODB Recordset to a report

I like to bind a adodb recordset to a report in VBA.



Avatar of vinnyd79
vinnyd79

You need to set the DataSource property to the recordset.
Maybe this example can help:

http://www.freevbcode.com/ShowCode.asp?ID=6335
Avatar of ibeling

ASKER

Sorry i forget to say explicit that this report is a ms-access report (VBA).
So your advise will not help.

Regards Ingo
Avatar of Ryan Chong
In Access, you can bind the Report with a Query, and you can do a Fitler then if necessary. To open an Access report, you probably need using the Docmd.OpenReprot method, like:

DoCmd.OpenReport "myReport", acViewPreview

for full syntax, you can refer to:
http://msdn.microsoft.com/library/en-us/vbaac11/html/acmthactOpenReport_HV05186500.asp
http://msdn.microsoft.com/library/en-us/modcore/html/deconworkingwithdocmdobject.asp

ASKER CERTIFIED SOLUTION
Avatar of Ryan Chong
Ryan Chong
Flag of Singapore image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial