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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How do you Run a Procedure from another DB? (HELP!) 1

Status
Not open for further replies.

airon

Programmer
Jun 21, 2001
21
0
0
US
I am trying to set up a process where I will be able to open a DB and then run an exsisting module from with the DB I opened.

Does anyone know how to do this?

my example code:
In the database I open I have a procedure called "test".
This code attempts to run this procedure, but obvisouly does not work.

Dim Db As Database
Dim MyWrkSpace As Workspace
Dim MyFile As String
Dim FilePath As String

FilePath = "S:\Risc\MISPROD\DB\_IP\"
MyFile = "test.mdb"

Set MyWrkSpace = DBEngine.Workspaces(0)
Set Db = MyWrkSpace.OpenDatabase(FilePath & MyFile)

Db.Execute (&quot;test&quot;) <---How do I call a precedure???????
 
AFAIK, the recommended process is to include the foregi db in the references of the db you are attempting to use to run the procedure. You can add the reference programmitacally or use thetools menu (from the code window ONLY) to do so statically.

MichaelRed
mred@att.net

There is never time to do it right but there is always time to do it over
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top