Running access from VB


G

GeorgeMar

I am not sure if this is the right place to be posting
this, if not, please redirect me.

I have a first MDB that runs a procedure and opens a form
in a second MDB, as shown in the sample below:

Public Sub OpenSIS(openForm As String)

Dim appSIS As New Access.Application

appSIS.OpenCurrentDatabase "ExternalMDB",
False, "password"

appSIS.Run "ExternalProcedure", arg1, arg2

appSIS.DoCmd.openForm "ExternalForm"

appSIS.Visible = True

End Sub

I want to now do the first MDB calling from a VB
executable instead that still runs the second MDB. What
would be the equivalent methods to use?

many thanks
george
 
Ad

Advertisements

A

Alex Dybenko

in vb code will be exactly the same. you only have to set a reference to
access
 
D

Douglas J. Steele

Or, if you prefer not setting a reference, change

Dim appSIS As New Access.Application

to

Dim appSIS As Object

Set appSIS = CreateObject("Access.Application")

Note that in either case Access must be installed on the workstation for
this to work.
 
Ad

Advertisements


Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top