Copy queries between databases

RichardMGreen

Well-known Member
Joined
Feb 20, 2006
Messages
2,177
Hi all

I'm having a bit of a tidy-up of our access databases and I've done all of the tables.
Now I've got to move about 100 queries between databases and I'm looking for a quick way to do this (apart from copy/paste).

Does anyone know of any VBA code or other method that will allow me to do this?
 

Some videos you may like

Excel Facts

Back into an answer in Excel
Use Data, What-If Analysis, Goal Seek to find the correct input cell value to reach a desired result

Norie

Well-known Member
Joined
Apr 28, 2004
Messages
76,218
Office Version
  1. 365
Platform
  1. Windows
In the 'destination' database Goto External Data>Access...

Choose the 'source' database.

On the Queries tab choose all the queries you want to import.

If you don't want the data goto Options and select Definition Only.

You can do this for Tables, Reports, Forms...
 

HiTechCoach

Well-known Member
Joined
Aug 29, 2010
Messages
1,008

ADVERTISEMENT

Yes you can use drag and drop between databases but it only works for a single object at a time. If you have multiple objects it may be a lot faster to use the get external data option to get multiple objects or even all the objects for another database.
 

Norie

Well-known Member
Joined
Apr 28, 2004
Messages
76,218
Office Version
  1. 365
Platform
  1. Windows
Boyd

You can actually drag and drop multiple objects in Access 2010.

I know you never used to be able to do it, not that I ever saw the need.

As far as I know the External Data option has been about since Access 97.
 

HiTechCoach

Well-known Member
Joined
Aug 29, 2010
Messages
1,008
Boyd
You can actually drag and drop multiple objects in Access 2010.
Norie,

Thanks for pointing that out.

I don't use 2010 very much. I use the other versions. 2010 is just to unstable for me to use in production. Waiting for 2010 SP2 update.
 

Watch MrExcel Video

Forum statistics

Threads
1,122,464
Messages
5,596,288
Members
414,052
Latest member
Dual Showman

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