kenspencer
asked on
Using VB6 to Open Access 2000 Report
Does this technique (obtained from another EE question)
-------------------------- ---------- ---------- ---------- ---------- ---------- ---
Const dbPathName = "c:\database.mdb"
Const strPassword = "PASSWORD"
Dim Acc As Object, db As Object
Set Acc = CreateObject("Access.Appli cation")
Set db = Acc.Application.DBEngine.W orkspaces( 0).OpenDat abase(dbPa thName, 0, False, ";pwd=" & strPassword)
Acc.OpenCurrentDatabase dbPathName, False
Set db = Nothing
Acc.DoCmd.OpenReport "ReportName", acPreview
Set Acc = Nothing
-------------------------- ---------- ---------- ---------- ---------- ---------- --
work if the target machine only has the VB app and the .mdb file installed (MS Office may not be installed or the same version of Access)? Any change if the .mdb is a .mde instead? This is being programmed in VB6 & Access 2000.
Thanks.
Ken
--------------------------
Const dbPathName = "c:\database.mdb"
Const strPassword = "PASSWORD"
Dim Acc As Object, db As Object
Set Acc = CreateObject("Access.Appli
Set db = Acc.Application.DBEngine.W
Acc.OpenCurrentDatabase dbPathName, False
Set db = Nothing
Acc.DoCmd.OpenReport "ReportName", acPreview
Set Acc = Nothing
--------------------------
work if the target machine only has the VB app and the .mdb file installed (MS Office may not be installed or the same version of Access)? Any change if the .mdb is a .mde instead? This is being programmed in VB6 & Access 2000.
Thanks.
Ken
Interesting...
one thing for sure is that it won't work without Access properly installed.
ASKER
emoreau,
Does your comment mean that a compiled and installed VB program would not have the necessary DLLs to open a stand-alone .mdb?
Ken
Does your comment mean that a compiled and installed VB program would not have the necessary DLLs to open a stand-alone .mdb?
Ken
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Anything else, anybody? If not, I will award emoreau the points.
Ken
Ken
ASKER
Sigh ... guess it's back to Crystal Reports.