Solved

Application Crashing when calculating

Posted on 2006-06-14
12
301 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
[X]
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
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
Use Case: Protecting a Hybrid Cloud Infrastructure

Microsoft Azure is rapidly becoming the norm in dynamic IT environments. This document describes the challenges that organizations face when protecting data in a hybrid cloud IT environment and presents a use case to demonstrate how Acronis Backup protects all data.

 
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

Migrating Your Company's PCs

To keep pace with competitors, businesses must keep employees productive, and that means providing them with the latest technology. This document provides the tips and tricks you need to help you migrate an outdated PC fleet to new desktops, laptops, and tablets.

Question has a verified solution.

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

Phishing attempts can come in all forms, shapes and sizes. No matter how familiar you think you are with them, always remember to take extra precaution when opening an email with attachments or links.
Access developers frequently have requirements to interact with Excel (import from or output to) in their applications.  You might be able to accomplish this with the TransferSpreadsheet and OutputTo methods, but in this series of articles I will di…
Basics of query design. Shows you how to construct a simple query by adding tables, perform joins, defining output columns, perform sorting, and apply criteria.
With Microsoft Access, learn how to specify relationships between tables and set various options on the relationship. Add the tables: Create the relationship: Decide if you’re going to set referential integrity: Decide if you want cascade upda…

717 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