473,396 Members | 1,755 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

DoCmd.OpenQuery takes up memory?

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!
Jan 31 '08 #1
1 2113
MMcCarthy
14,534 Expert Mod 8TB
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!
You need to close the query. However, the memory issue will remain. Access retains a lot of information in its memory until its dumped. You do this by running Compact and Repair. Shedule this for a time when no users are on the system. It will clear the memory.
Feb 5 '08 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: Jim | last post by:
I am using Access 97 on a PC running Windows NT 4.0 SP6a. I have some code (shown below) intended to add a set of records to one table (tblGradeProps) when a new record is created in another...
3
by: jj | last post by:
I've got a form button that fires off 3 queries but if the first query returns an error, I don't want the other two queries to happen. Example: first query runs an insert from a linked table but...
1
by: tina | last post by:
Hello, I would really appreciate some help. I am still learning VBA and I feel like my brain is fried already. Below I am trying to run a query and do a loop. I actually get the data set but...
2
by: Tyson | last post by:
I have got this little piece of code that fires on exit of a text box. It run's my query perfectly based of my form input. But I don't know how to bring result in my query back to a text box on my...
5
by: alingsjtu | last post by:
Hello, every body. When execute dynamic generated multiple OPENQUERY statements (which linkes to DB2) in SQLServer, I always got SQL1040N The maximum number of applications is already connected...
2
by: technocraze | last post by:
Hi community experts, May I know is it possible to display an error message or not opening a form or query when users provide with the wrong inputs in the DoCmd.OpenForm and DoCmd.OpenQuery...
10
by: teddysnips | last post by:
My clients have asked me to maintain a database that was developed in- house. It's pretty good, considering the developer isn't a "programmer". The first thing they want me to do is to split it...
6
by: RZ15 | last post by:
Hi, I frequently have code in my forms that will turn warnings off, run make table queries, then turn warnings back on using the following code: DoCmd.SetWarnings WarningsOff DoCmd.OpenQuery...
4
by: gazza10001 | last post by:
Hi i hope you can help my company uses access and has modified for its needs usually what happens is you serach for the invoice by its number and then it brings all the information up such as...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.