Macro works when open, but when double clicked closes database?!

G

Guest

I have a macro that runs a series of queries that build off of one another,
closing each step of queries along the way, and leaves the final query
results open for viewing when completed. It works fine when I run it from
the design mode, but when I double-click and run it from the macro window it
runs through the steps and then after the last query is run, it closes the
entire database? Any suggestions?
Thanks in advance!
 
J

jahoobob via AccessMonster.com

Opening a query that is based on numerous other queries is all you have to do.
Each previous query will "run" on its own as needed when that one is opened.
You are making excessive work for Access as when you open a query that is
based on a query that you opened and closed, it opens and closes that query
(although you don't see it) again.
Ditch the macro and open the final query. Hint: Don't put any sorts in any
of the preliminary queries as this adds overhead (time.)
 
G

Guest

Hi Steve,

I ended up changing some of my queries and remade the macro. Now it works
with no problems. Thanks.

Peter
 

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