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:
00786613
Views:
18
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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform