Solved

Application Crashing when calculating

Posted on 2006-06-14
12
256 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 500 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
 
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
Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

 
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

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

Suggested Solutions

In the previous article, Using a Critera Form to Filter Records (http://www.experts-exchange.com/A_6069.html), the form was basically a data container storing user input, which queries and other database objects could read. The form had to remain op…
It took me quite some time to sort out all the different properties of combo and list boxes available from Visual Basic at run-time. Not that the documentation is lacking: the help pages are quite thorough and well written. The problem was rather wh…
Familiarize people with the process of utilizing SQL Server views from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Access…
With Microsoft Access, learn how to start a database in different ways and produce different start-up actions allowing you to use a single database to perform multiple tasks. Specify a start-up form through options: Specify an Autoexec macro: Us…

707 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now