SQL view 97

D

Dave

Hi all,
I'm using Access 97 and want to know if there is a short
cut to view the SQL of a query without having to open it
in design view first. Display times can take a long time
across our network when trying to view the design grid...
Thanks in advance
Dave
 
A

Allen Browne

Not through the standard query interface.

You could create a form to do it.
The RowSource for your combo would be:
SELECT MSysObjects.Name FROM MsysObjects
WHERE ((MSysObjects.Type = 5) AND ([Name] Not Like "~*"))
ORDER BY MSysObjects.Name;
Then use the SQL property of the QueryDef to view/change the SQL statement.

Realistically though, the retrieve time should not be great. Presumably you
have split the database (tables only in a shared back end mdb, and interface
including queries and linked tables in a front end on each user's local
machine).
 
D

david epsom dot com dot au

I know. I agree. I wish...

You can get the sql from the immediate window:
[CTRL][G]
?codedb.querydefs("myqueryname")

You can add an item to the right click menu or a
short-cut key to do the same thing: I DO NOT KNOW
HOW TO DO THIS WITH JUST A MACRO or MENU ITEM because
I can't work out a way to reference application.codedb.
So you need to have code like that above either in a
local code module or in a library code module or in
a com object add-in.

(david)
 

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