PLEASE!! Allow you to edit SQL of a query without opening it first

G

Guest

Currently, in order to edit the SQL of a query, you need to EXECUTE the query
OR open it in DESIGN view. What if there is an error in the query that you
need to fix???? The query will NOT execute and it will NOT open in DESIGN
view. Hence, there is NO WAY TO EDIT THE QUERY and fix the problem.

I suggest that there should be a "Edit SQL" button in the main Form Toolbar
where the forms are listed, next to the "Open", "Design" and "New" buttons.

Thanks!

----------------
This post is a suggestion for Microsoft, and Microsoft responds to the
suggestions with the most votes. To vote for this suggestion, click the "I
Agree" button in the message pane. If you do not see the button, follow this
link to open the suggestion in the Microsoft Web-based Newsreader and then
click "I Agree" in the message pane.

http://www.microsoft.com/office/com...3d9c7f2154&dg=microsoft.public.access.queries
 
D

Duane Hookom

Open the debug window (press Ctrl+G) and enter something like:
? Currentdb.QueryDefs("qYourQueryName").SQL
this will display the existing SQL of the query. You can then modify the sql
and change the query using:
Currentdb.QueryDefs("qYourQueryName").SQL = "SELECT ... FROM ... WHERE ...
GROUP BY ... ORDER BY ...;"
You connect the ...'s
 

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