Find the query executed by OpenQuery

C

cengelhardt

I have visual basic code behind a form in an Access database that I did not
create. There are several blocks where different queries are executed, like:
DoCmd.SetWarnings (0)
DoCmd.OpenQuery "DELETE INSTALL DATA"
DoCmd.OpenQuery "DELETE EDITION OVERLAP"
DoCmd.OpenQuery "Make install data"
DoCmd.OpenQuery "Make Edition Overlap"

There is not a query in the database with any of the names in the quotes.
So, I have no idea where to find the code for these queries. I really need
to know what Make Install data is doing because no data is being returned in
the report files this code ultimately creates.

Can someone please clue me in on where these queries are stored and how to
look at and/or modify them?
 
D

Douglas J. Steele

It's possible that they've been hidden. If you're using Access 2003 or
earlier, select Tools | Options from the menu and check Hidden Objects on
the view tab.

If that fails to reveal it. go the Immediate Window (Ctrl-G), type the
following

?CurrentDb.QueryDefs("Make install data").SQL

and hit Enter. You should see the SQL underneath.
 

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