Launch Access using VBA

depoladim

New member
Local time
Today, 01:15
Joined
Feb 17, 2010
Messages
2
Hi,

Quick question for the experts.

I have two access databases, A and B. I am running VBA from within A, and I would like to get table b from database B, and append it into table a in database A. It goes without saying that the tables a and b both have the same structure. What is the best way of doing this using Access VBA?

My ultimate goal is to append hundreds of tables, each from a different access file, into a single Access file. I had launched Excel using Access VBA and transferred data from access to excel, but I have never launched Access from within Access.

Any help is appreciated.

Thanks.
 
Well if you have access open you could import and Append via a query to your table like so:

INSERT INTO ExistingTable
SELECT YourTable.*
FROM YourTable IN 'C:\SomePath\DB1.mdb'[MS ACCESS;];


One step further and using VBA you could loop through several DBs making the Table names, file names and paths all dynamic.

This does not launch MS Access but if I understand your intent you do need to?
 
That's exactly what I was looking for... Thanks a lot.
 

Users who are viewing this thread

Back
Top Bottom