Cannot open query!

M

mscertified

I have a query that will not open, I get a message saying 'Join expression
not supported'. Is there any way to get the SQL of the query without opening
it in the designer??? The query does run and execute ok. The SQL has an ANDed
condition in a LEFT join.
 
E

Ed Ardzinski

You could use some VB to get at the query text, then see what others make of
it...

This code may be a little verbose, but gets the SQL..you might want to send
the string variable to a file if it's quite large or you don;t want to type
it out. :)
 
M

mscertified

where was the code?

Ed Ardzinski said:
You could use some VB to get at the query text, then see what others make of
it...

This code may be a little verbose, but gets the SQL..you might want to send
the string variable to a file if it's quite large or you don;t want to type
it out. :)
 
J

John Spencer (MVP)

If you know how to access the immediate window in vba (Control+G), you can do
something like

?CurrentDb().QueryDefs("QueryName").SQL

when you hit return, the sql should be printed in the immediate window. You can
copy if from there.
 
Top