Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

VB6 & MS Access 97 Automation

Status
Not open for further replies.

nidgep

Programmer
Sep 4, 2001
80
GB
Hello database experts!

I recently posted a message regarding the running of reports from VB6
against an Access 97 database.Thankyou to all whom helped me.
The reports are all finished now and the next stage of the program is due
to be shipped shortly.
However...........
Quite a few of the users do not have MS Access 97 installed or even MS
Office, and I have tried to get the reports to run by installing the
MSACC8.OLB which is the component referenced with the VB application.
When attempting to create a setup program, a message appears saying that
dependency information for the MSACC8.OLB file cannot be found.

I then attempted to create a dependency file and copied it to the location
of the MSACC8.OLB.

The setup program now ran Ok. The setup ran OK, but the reports cannot be
run due to ActiveX component cannot create object error.

Is there anything that I can do to get around this problem without having
to install MS Access 97?
Can I obtain a runtime version of Access97 (version 8) and if so will this
solve the problem?

Please help!!


Nigel.
 
Are you accessing your MS Access data using ADO connections or by using the Database object of MS Access? If you're doing everything with ADO, then a reference to MS Access is not required. If you have to reference the MS Access library, then the end-user needs to have MS Access installed on their system.
 
Hi neilkonitzer!

The VB6 code uses ADO 2.5 to connect to and manipulate the Access 97 database.
The reports are actually created in Access 97 and I have made reference to the MSACC8.OLB library through VB.
I have then created an instance of an ACCESS.APPLICATION and used this object variable to run the reports from within VB.
For example;
Dim objReport as Access.Application

On Error Resume Next
Set objReport = GetObject(, "Access.Apllication")
If Err <> 0 Then 'access is not open
Set objReport = CreateObject(&quot;Access.Application&quot;)
End If

So....
as you have stated it seems as though MS Access97 is required before the reports can be run.

I know this sounds crazy, but...........
Is it possible to shell to the path on the server and use
a reference to that instance to create the reports?

Regards

nidgep
 
Based on what you stated, your end users must have MS Access installed if their going to use MS Access reports. If you need to generate reports for your application, then you could re-design the reports using the report feature in VB, or you could use Crystal Reports to craft your reports and include their run-time .dll into your package. Neil Konitzer, President
Freisoft
 
Hi Neil,

Thanks for the tips!

I have now temporarily re-written the reports using the VB data report tool (with limited scope) and will install Crystal reports and use their active x report tool from within VB instead.

I dont want the users to have Crystal Reports, but rather just be able to run the reports specified by the system spec, not on an Adhoc basis.

In your opinion is this the best way to go?

Regards

Nigel
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top