>I'm new to VB (from the VFP environment). I have a question that's somewhat of an emergency:
>1. How can you print a report from an Access MDB using VB?
>2. If (and only if) #1 is impossible, how do you attach data to the DataReport object? I've tried MyAccess.MDB, and ADOMyData (after populating it with a Select command), but when I attempt to print in a button click event with "MyReport.PrintReport True," it tells me that the data source isn't found.
>
>Any help would be greatly appreciated,
>
>Joy Ruhe
You have to create an Access object and you'll be able to print a report.
1-Set a reference to Access in the Project/References Menu
2-Declare an Access object
Dim obj as Access.Application
Set obj = New Access.Application
3-Use code to open your MDB file and print the report.
I don't have to right syntax for point #3 handy with me.