Running access from VB

  • Thread starter Thread starter GeorgeMar
  • Start date Start date
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
 
in vb code will be exactly the same. you only have to set a reference to
access
 
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.
 

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

Back
Top