Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Application Crashing when calculating

Posted on 2006-06-14
12
Medium Priority
?
310 Views
Last Modified: 2008-02-01
I have a fairly intensive application build on MS Access 2003.  Often when the user is entering inforamtion, the CPU usage jumps to 100% and then the application crashes.  Their computer has 512MB RAM and plenty of open hard drive space.  Granted, the computer was fragmented pretty bad - 22% file frag. (which I'm cleaning up now), but I'm surprised that it would cause the application to fail.  

Also, I have gone into the code module and checked to break on all errors, yet it crashed witout breaking.

So I have two questions:
1.  Is it likely that fragmentation caused the application to crash
2.  Can I limit Access to only calculate when a command button is pushed, rather than continously calculating.  I have noticed that there is a calculation everytime a key is entered - even when type items into a memo box.

By the way - it NEVER crashes on my desktop (1 GB RAM).  So I don't think it's an application issue per se.

Thanks
0
Comment
Question by:dewster1971
12 Comments
 
LVL 65

Accepted Solution

by:
rockiroads earned 1500 total points
ID: 16908845
1. Doubt it, 22% isnt that bad
2. Yes, u can, whats the calculation?

I assume this is on a form, u may have a keypress event which keeps calculating
u could move that to the afterupdate event, so calculate only when value is changed
0
 

Author Comment

by:dewster1971
ID: 16908853
Indeed after I cleaned up the fragmentation, I had the same problem.  It's not really a calculation that's occuring.  It seems to be happening when I type into a memo box.  This is occuring on a form and the event associated with the memo box is "on change".  You think this is the problem?

I will change that event to after update.
0
 

Author Comment

by:dewster1971
ID: 16909052
That helped but I'm still getting to crash.
0
Veeam Disaster Recovery in Microsoft Azure

Veeam PN for Microsoft Azure is a FREE solution designed to simplify and automate the setup of a DR site in Microsoft Azure using lightweight software-defined networking. It reduces the complexity of VPN deployments and is designed for businesses of ALL sizes.

 
LVL 65

Expert Comment

by:rockiroads
ID: 16909060
have u tried the usual compact/repair fix?

problem with adding into memo fields eh
0
 

Author Comment

by:dewster1971
ID: 16909137
I compact on every close.  When changing the event to after update it seems to not be a problem when entering into a memo field, now I run into the problem when executing a command button.  I just compiled my code and don't know if that will help.  I also checked every other input box to make sure there are no more "on change" events.  I do have an "on load" event for this form.  Thought about changing that to on open, code is a requery for a specific form - probably don't need that one.

Any other suggestions?

And how do I stop the application from calculating until I tell it to?
0
 
LVL 77

Expert Comment

by:peter57r
ID: 16909452
Hi dewster1971,
>  event associated with the memo box is "on change".

Do you really need to use this event?  This will run after every keystroke.
Can you consider using the afterupdate or exit events?

Pete
0
 
LVL 16

Expert Comment

by:Chuck Wood
ID: 16910902
If it crashes on one computer and not another, I would suspect a corrupted Access file or Operating System file.

If nothing else fixes the problem, I would consider:
1. Uninstall and reinstall Access (or Office).
2. Rebuild the computer by reinstalling the Operating System and all your programs (don't forget to backup all your data first--and check the backup).
0
 
LVL 20

Expert Comment

by:clarkscott
ID: 16911304
Try deleting the memo box (and all associated code) and bring in a new one.  Sometimes funky things happen with controls and they seem to 'lose their mind'.   I've experienced strange things before and sometimes it's the only fix.

I've had entire forms act weird.... by deleting the form and starting over... all was well.

Scott C.
0
 

Author Comment

by:dewster1971
ID: 16911671
I've done some more investigating by running the task manager while running through some inputs, and I found that every once in a while (usually when there is a pause in inputting),  msscript runs and hogs the memory.  I'm not familiar with the executable or if there is a way to minimize it's effect.

Tips, comments?

0
 
LVL 65

Expert Comment

by:rockiroads
ID: 16914568
there obviously is some background task taking cpu time and like u say, hogging memory

why is MS Script running?

Well something is using that ocx

I saw this, perhaps it may help http://support.microsoft.com/?kbid=819897

0
 

Author Comment

by:dewster1971
ID: 16920920
Thanks for everyone's help.  I will attribute the save to rockiroads for his "on change" suggestion - which helped a bit.  Looks like the bigger problem was the lack of Service Pack 2 on the users XP computer.  Once that was installed everything ran fine.
0
 
LVL 65

Expert Comment

by:rockiroads
ID: 16921015
Thanks, and good to know, a simple SP would make such a change. For what you got, you wouldn't of thought so
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article describes a method of delivering Word templates for use in merging Access data to Word documents, that requires no computer knowledge on the part of the recipient -- the templates are saved in table fields, and are extracted and install…
We live in a world of interfaces like the one in the title picture. VBA also allows to use interfaces which offers a lot of possibilities. This article describes how to use interfaces in VBA and how to work around their bugs.
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…
Suggested Courses

810 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question