Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to start a new query as SQL

Status
Not open for further replies.

harrymossman

Technical User
Sep 5, 2002
255
US
The process for starting an SQL query in Access is kind of tiresome. Does anyone know a shortcut or way to customize so that Access starts with a blank SQL query instead of a template? What I am doing is clicking New Object: Query (which I have on the quick toolbar), closing the Show Table box, then clicking the SQL view button (which I also have on the quick toolbar). I am not finding keyboard shortcuts for any of these.
 
You can create a query with SQL like:
Code:
Select NAME
FROM msysobjects
WHERE NAME ='zzz'
UNION ALL Select NAME
FROM msysobjects
WHERE NAME ='zzz';
This query can't be opened in design mode. Then create an autokeys macro that opens the query in design view. Within the macro design, use the name column to assign the name of ^q. Then whenever you press Ctrl+Q, this query will open in SQL view for you to modify and save with another name.

Duane
Hook'D on Access
MS Access MVP
 
Now you could build yourself a SQL editor from a standard form. I know there is a example in the Access Desktop Developers Handbook. I am sure I could build one with all the bells and whistles you would want or need. With that said, I have to assume someone has one out there on the web already.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top