Find the query executed by OpenQuery

  • Thread starter Thread starter cengelhardt
  • Start date Start date
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?
 
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.
 
Back
Top