Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Open Access reports from VB
Message
Information générale
Forum:
Visual Basic
Catégorie:
Access
Divers
Thread ID:
00786477
Message ID:
00786613
Vues:
19
This message has been marked as the solution to the initial question of the thread.
Hi Allan.

You can use this code:
Const dbPathName = "c:\database.mdb"
Const strPassword = "PASSWORD"
Dim Acc As Object, db As Object

Set Acc = CreateObject("Access.Application")
Set db = Acc.Application.DBEngine.Workspaces(0).OpenDatabase(dbPathName, 0, False, ";pwd=" & strPassword)
Acc.OpenCurrentDatabase dbPathName, False
Set db = Nothing
Acc.DoCmd.OpenReport "ReportName", acPreview
Set Acc = Nothing
>Hi,
>
>I'm (reluctantly) working on an VB6 app that uses an Access 97 (ugh - not my choice) database. Can I develop some reports in Access 97 - and run these reports from VB6 (assuming, of course, that the user has the Access runtime on their P.C.)?
Éric Moreau, MCPD, Visual Developer - Visual Basic MVP
Conseiller Principal / Senior Consultant
Moer inc.
http://www.emoreau.com
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform