Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

Application Crashing when calculating

Posted on 2006-06-14
12
286 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
Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

 
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

Ransomware: The New Cyber Threat & How to Stop It

This infographic explains ransomware, type of malware that blocks access to your files or your systems and holds them hostage until a ransom is paid. It also examines the different types of ransomware and explains what you can do to thwart this sinister online threat.  

Question has a verified solution.

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

The first two articles in this short series — Using a Criteria Form to Filter Records (http://www.experts-exchange.com/A_6069.html) and Building a Custom Filter (http://www.experts-exchange.com/A_6070.html) — discuss in some detail how a form can be…
Preparing an email is something we should all take special care with – especially when the email is for somebody you may not know very well. The pressures of everyday working life stacked with a hectic office environment can make this a real challen…
Using Microsoft Access, learn some simple rules for how to construct tables in a relational database. Split up all multi-value fields into single values: Split up fields that belong to other things into separate tables: Make sure that all record…
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…

860 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