Wrox Programmer Forums
|
Access VBA Discuss using VBA for Access programming.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access VBA section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old February 1st, 2008, 08:43 PM
Registered User
 
Join Date: Feb 2008
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Memory concern

--------------------------------------------------------------------------------

Hi all,

Just a small question concerning the memory problem. Whenever we open an existing query inside a module:

DoCmd.OpenQuery ("Query Name")

Do we have to put another command line to close the query? Because I'm suspecting this will retain the results obtained from the query into the memory and expand the Access file. Since whenever we open a record set, we have to close it. I'm just wondering if we really need to close the query to prevent the file keep expanding since all of my access files are getting bigger everyday even though I haven't add anything to them, just re-run the modules. If we need to put a closing command, what is it?

Thanks a lot! Have a nice day folks!

 
Old February 15th, 2008, 09:30 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 1,151
Thanks: 2
Thanked 14 Times in 14 Posts
Send a message via ICQ to SerranoG Send a message via AIM to SerranoG
Default

Interesting... I never really thought of closing one like that because when I invoke a query via VBA, it's to create a temporary table of values. Otherwise, I use a DLookUp or something else to get values out of an actual query. I don't open it.

The syntax would be something like

DoCmd.Close acQuery, "Query Name", acSaveNo

Look up the CLOSE method in HELP.


Greg Serrano
Michigan Dept. of Environmental Quality, Air Quality Division





Similar Threads
Thread Thread Starter Forum Replies Last Post
Security concern vs2008 mvc rajivkalra Visual Studio 2008 1 February 9th, 2008 08:34 AM
ASP/DB Concern Help!! jramshur Classic ASP Databases 1 February 26th, 2007 08:54 PM
Memory akkad C# 2005 3 January 10th, 2007 04:46 AM
Concern and feedback picnn Intro Programming 1 October 30th, 2006 02:36 PM
Memory linguva Access 2 December 19th, 2003 07:22 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.