Run a Macro from a different database

KC*3

New Member
Joined
Jul 20, 2005
Messages
46
Is it possible to run an Access Macro in a master database that will run an Access Macro in a different database?

I have several databases that are essentially linked to the main database. This was done to more efficiently store historical data based on specific teams. But the data on a daily basis comes from a master database. Once the master database is done running I'd like to have the linked database (or child databases) run their respective macros.

Don't know if this is even possible and don't want to keep spinning my wheels.

Thanks for any help you can give me.

Katrina

P.S. I am running Access 2000-2003
 

Excel Facts

Do you hate GETPIVOTDATA?
Prevent GETPIVOTDATA. Select inside a PivotTable. In the Analyze tab of the ribbon, open the dropown next to Options and turn it off

MyBoo

Board Regular
Joined
Aug 9, 2006
Messages
217
If your tables, in your child databases, are linked to the main database, then you should be able to run your macro(s) from within your main database.

You haven't provided any information as to what your macros are doing, but if they run against the linked tables and you're not doing something that requires additional information, I don't see why your macros wouldn' t run correctly from the main db.
 

KC*3

New Member
Joined
Jul 20, 2005
Messages
46
Sorry I am replying so late. I hope you can still help me.

My child databases are using tables linked to the master database. The macros in the child database would be running queries that append the data from the linked tables to new tables, but just filter for the specific data for that child (team). The child databases will hold more of a historical view of the data.

I just don't know how to set it up. How do I Run one Macro in my master database that will run the macro in the child database. I am limited by my lack of VBA knowledge I am afraid.

Thanks for your help!
 

SydneyGeek

MrExcel MVP
Joined
Aug 5, 2003
Messages
12,251
Maybe if I rephrase what MyBoo said...

If you are using linked tables, there is no need to specifically run macros or code in the child database.
Do the following --

1. Make sure all tables hat you need to work with are linked through from the child database
2. In the master, create the queries to select and append data
3. Create the macros / code to run those queries
4. Run the macros in the master. They will treat the data as if it was local

This is typical for a split database setup. Tables go in a backend database (child in your case) and are linked through to the front end (master in your case). All of the application logic (queries, forms, reports, macros, code) live in the front end.

But, I need to ask... If you already have archived data in the child, why do you want to duplicate it in the master? If you want to query or report on it, there's no need. Simply build queries to display it, then report on those queries. The last thnig you need from the point of view of data integrity, is duplicated data.

Denis
 

Forum statistics

Threads
1,141,587
Messages
5,707,258
Members
421,498
Latest member
matinebi

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top