Display SQL Code for a Query

M

Marshall Barton

SlimHAck said:
How might I display the SQL code for a query in a report?


Depends on where/how the query is specified.

If the report's record source is the name of the query, then
just select the query in the database window and click on
the design button. If that takes you to the QBE grid, then
select SQL view from the View menu or the query design tool
bar.

If the report's record source is an SQL statement, then just
right click on the record source property and select Zoom
from the pop up menu (or you could use the builder button).

If you are using VBA code in the report's Open event
procedure to construct the SQL statement, then add a
Debug.Print strSQL statement to the procedure.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top