Need Help with simple code

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a Access database on my server and I want to run a macro from another
database that is on the same server just a different database. How can I do
this? I want to push a button from my switchboard to run the macro from
another database. Here is the scoop.

Database 1: My database 1.mdb

on path: \\psmrdcfs01\sty\Workarea\SuretyLink\FormFlow\Development\Frontend
(this is just an example)

Database 2: My database 2.mdb

on path: C:\Documents and Settings\tromil\Desktop\My Copys of db

Macro name: My macro, The macro is on databse two but want to run from
database one. What is the code to do this or how can I get started? Thanks
in advance and need help right away!
 
TKM said:
I have a Access database on my server and I want to run a macro from
another database that is on the same server just a different
database. How can I do this? I want to push a button from my
switchboard to run the macro from another database. Here is the scoop.

Database 1: My database 1.mdb

on path:
\\psmrdcfs01\sty\Workarea\SuretyLink\FormFlow\Development\Frontend
(this is just an example)

Database 2: My database 2.mdb

on path: C:\Documents and Settings\tromil\Desktop\My Copys of db

Macro name: My macro, The macro is on databse two but want to run from
database one. What is the code to do this or how can I get started?
Thanks in advance and need help right away!

It's not going to be so simple as it may seem. Does the macro work with
data in the database? If so, do you want it to work with the data in
Database 1 or in Database 2?

I believe you're going to have to either (a) import the macro to the
current database, then run the imported copy, then delete it, or (b)
open a second instance of Access by automation, open the second database
in that instance, and execute the macro with that instance. Approach
(a) will operate using the current database's data; option (b) will use
the other database's data.
 
All the queries and the one macro is in the second database. I just want a
button to run that macro from database one.
 
Back
Top