Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Printing Reports
Message
Information générale
Forum:
Visual Basic
Catégorie:
Autre
Divers
Thread ID:
00465270
Message ID:
00465625
Vues:
15
>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.
Guy Barrette, MCSD
============
Blog http://weblogs.asp.net/guybarrette
Microsoft Regional Director, Montreal, Canada www.microsoft.com/rd
MVP, ASP.NET http://mvp.support.microsoft.com/
President, Montreal Visual Studio User Group www.guvsm.net
INETA Regional Rep for Quebec www.ineta.org
UniversalThread Magazine Columnist (.NET Books Review Column) www.utmag.com
Tech Chair French Track, DevTeach 2004 & 2005 www.devteach.com
Business Architect, Microsoft Team - Nurun Inc www.nurun.com
XBox Live Gamer Tag: Slomo QC CA
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform