Copy Query

bwlytkr

Board Regular
Joined
Jun 8, 2012
Messages
185
Office Version
  1. 365
Platform
  1. Windows
  2. MacOS
Is there any way to copy an existing query and save to another name? i have several Queries to make with basically the same info just need to filter each one differently and would like to create different queries for each one instead of having to change the filters each time and it would be nice to be able to copy and rename them instead of having to build several of the same thing form scratch.
 

Excel Facts

How can you turn a range sideways?
Copy the range. Select a blank cell. Right-click, Paste Special, then choose Transpose.
One way is to swtich to SQL View, and copy the code out of there.
Then, create a new query, go to SQL View, and paste the code you just copied there, and name it whatever you want.
 
Upvote 0
1) select query in nav pane; ctrl+c, ctrl+v, rename in Save As prompt, edit in design view.
2) right click on nav pane object, choose from menu, edit new version in design
3) open in design view, click save button at top left of Access window or ctrl+s, edit in design
4) best: don't duplicate queries at all.

You should be running a single query from a form and provide the parameters from the form. I suspect you're running queries directly. If you need to modify (e.g. add a field to a query) you are fixing what, 6? 10? copies instead of one. Not to mention that it just creates unnecessary overhead.
 
Upvote 0
Thanks for the feedback and I'll give them a try to see if I can make it work. I appreciate it. thanks again.
 
Upvote 0
Just tried the Ctrl C and V and it worked great!! Made my day. Thanks for all the help.
 
Upvote 0
NP.
Still, not the route I would take but then it's not my db.
 
Upvote 0

Forum statistics

Threads
1,221,526
Messages
6,160,341
Members
451,638
Latest member
MyFlower

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
Back
Top