hello any help me to open and run ms access mdb file with access-report and access-form

Recommended Answers

All 5 Replies

what exactly are you trying to do?

are you trying to create access forms and reports from your vb6 application?

or,
trying to create forms and reports in access and want to fire those reports from vb6 application?

explain clearly...

i try my old access base application run from my new vb6 base application

Hi,

Reference a "Microsoft Access" Object library in your Project and try this code:

Dim MyAcc As New Access.Application
MyAcc.OpenCurrentDatabase "C:\MyDb.mdb" , True

MyAcc.DoCmd.OpenReport "MyReportName", acViewPreview

'Open Form
MyAcc.DoCmd.OpenForm "MyFormname"
'Quit access
MyAcc.Quit
Set MyAcc = Nothing

Regards
Veena

Hi,

Welcome, Mark the thread as "Solved"

Regards
Veena

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.