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.
 
Back
Top