Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Open Access reports from VB
Message
General information
Forum:
Visual Basic
Category:
Access
Miscellaneous
Thread ID:
00786477
Message ID:
00786700
Views:
12
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
Previous
Reply
Map
View

Click here to load this message in the networking platform