Access freezes, why? (1 Viewer)

pauly

Registered User.
Local time
Today, 21:27
Joined
Jul 8, 2002
Messages
49
I am using Access 2000 and for some reason it freezes at strange times. For exapmple when you output a report to MS Word using docmd.output etc this works fine but when you close word and go back to access, access freezes, why does this happen?
Anyone?
 

The_Doc_Man

Immoderate Moderator
Staff member
Local time
Today, 15:27
Joined
Feb 28, 2001
Messages
27,188
When Access freezes, does the "Start" button in the taskbar still work? If so, try to activate your "System Information" accessory (under System Tools). See if you have low resources.

If your windows color scheme is set up to really highlight idle vs. active windows, is the Access window the one that is now active?

Use ALT+TAB to see if something else is active at the moment. If you have a modal dialog somewhere that is somehow not "on top" then everything would freeze except the ALT+TAB function.
 

pauly

Registered User.
Local time
Today, 21:27
Joined
Jul 8, 2002
Messages
49
Thankyou for your suggestion The_Doc_Man, i monitered system recources as you suggested and found that outputting a one page report to MS Word by using a line similar to below:

DoCmd.OutputTo acOutputReport, "requestforCCrecords", acFormatRTF, "requestforCCrecords.rtf", True

This command line used up about 70% of system recources! This is unbelievable! If i chose to print preview the report in Access my system recources were about 78%, then when i pressed a button that executed the above line, or pressed the OutputTo Word (office links) button on the reports toolbar, this reduced the system recources to about 6% Therefor Access frezzes as the system is dangerously low on memory.

Even if i set the last field in the OutputTo command to True, so that the file outputted isnt opened straight away the system resources still dry up.

Why would this happen, surely you can output a report to Word without using up so much memory?
 

goaksmith

Registered User.
Local time
Today, 15:27
Joined
Jul 31, 2002
Messages
74
Network Drive

I am not sure if this will help you or not, but...Are you running this database off of a network drive? Because I have a database where I have to run simple macro to update things etc and it was taking hours to update on column to 0 etc...so I saved it to my harddrive insted of working off of the network drive and it worked fine. Like I said, I don't know if this will help you, but I thought I would share.
 

pauly

Registered User.
Local time
Today, 21:27
Joined
Jul 8, 2002
Messages
49
No thats not the problem, i will be using it on a network drive, but at the moment i am running it on my own computer and it still uses up all my memory, the problem is deffinitely to do with outputting to word
 

The_Doc_Man

Immoderate Moderator
Staff member
Local time
Today, 15:27
Joined
Feb 28, 2001
Messages
27,188
"Resources" is actually a reference to a fixed-length memory segment in Windows where your computer keeps pointers to things it has opened as windows or files. It is the area where "object" structures are kept. When you see references to "handles" in any Help file or API call, the handle USUALLY refers to something kept in the resource area.

In their infinite wisdom, Microsoft made this area exactly 64K in length (i.e. 16 bits) rather than figuring out ways to make it bigger when they needed it. Because of this incredible stroke of genius, a machine with 256 Megs of RAM can still run out of memory in a single application yet still have 128 Megs of RAM open! Because the memory that gets used up faster than any other is "Resources." And you CANNOT do anything to Windows to expand the area, as far as I know. (Not sure about XP, but for anything earlier, I think I'm right on that.)

Then, to make matters worse, none of the MS Office suite is noted for being nice about resource release. They almost ALWAYS hold on to what they've got longer than they really need it. With the unfortunate result that the resources stay reserved longer then YOU really need them.

Things to look for include LOTS of sub-reports, lots of changes of font in a single report (yeah, font files use up resources - each .TTF file has be to open when you process a report using that font). If you have any OLE references, embedded pictures, etc. - more files = more resources.

My best advice would be to look at the report, see just how many different fonts and external objects are involved, then see if you can somehow minimize them. Also, if you have other apps open, CLOSE them if you don't need them. Closing an app usually makes Windows reclaim slots in the resource area. The less your machine is doing outside your app at the time, the more your app can do before it goes belly up.

For more reasons that we can ever know, "simpler = better" when Windows is involved.
 

pauly

Registered User.
Local time
Today, 21:27
Joined
Jul 8, 2002
Messages
49
Thanks for your help The_Doc_Man, unfortunately i dont think i will ever find the answer to this problem. I am only using the one font in the report and the only change between the text is that some is bold. I have no images or OLE objects amd my background is white (default). Its a mystery i know.

Thanks anyway
 

Users who are viewing this thread

Top Bottom