How to view query design after executing without losing results?

D

David Norman

I don't want to have to rerun a big query just because someone wants to check
out the design.

Simple question but the oracle of google doesn't answer intelligibly...
 
A

Allen Browne

Open the Immediate window (Ctrl+G), and enter:
? CurrentDb.QueryDefs("Query1").SQL
substituting the name of your query for Query1.

You can then read the SQL statement, or paste it into a new query if you
want to see it graphically.

Of course, you can't alter the SQL without re-running the query.
 
D

David Norman

Thanks for the reply. And how about if the person checking is my boss
(couldn't read sql to save his life :)
 
A

Allen Browne

Copy the SQL statement from the Immediate Window (Ctrl+C.)
Open a new query.
Cancel the table dialog.
Switch to SQL View (left most toolbar icon, or View menu.)
Paste (Ctrl+V.)
Switch to Design view.
 
Top