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:
00786700
Vues:
13
Thanks Eric. By the way, the reference to "relucatant" in my post was having to use Access 97 as the DB for this project.


>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.)?
Al Williams

Anola MB, CANADA
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform