By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
434,903 Members | 1,856 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 434,903 IT Pros & Developers. It's quick & easy.

Opening and closing of Queries in VBA

P: n/a
RE: Access 2003

I have this line that runs a query..poretty simple.......
DoCmd.OpenQuery "MyQuery", acViewNormal, acEdit

After the above line runs, is it necessary to explicitly close the
DoCmd.Close acQuery, "MyQuery"

After the OpenQuery statement runs, does Access close and destroy the
query object from memory?

I'm also looking for a good website that has in-depth information about
the internals of Access where recommendations on coding practices would
ensure good memory management. Does anyone know of one?


May 24 '06 #1
Share this Question
Share on Google+
1 Reply

P: n/a
Shouldn't stay in memory - you're not creating a reference to it or
anything, eg.

dim qdf as querydef
set qdf=currentdb.querydefs("SomeQuery")

May 25 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.