I have been struggling for several weeks to try to figure out the root of a problem in my Access application. I am working in Win XP and Access XP. I am experiencing frequent crashing, as described below, but without a consistent cause that I am able to identify.
I don't think my application is overly large - 10 tables, about 50 forms. The majority of the user's time will be spent in one form. When I try to use this form in a test situation, it frequently crashes Access altogether (with the "Access has experienced an error and needs to close... Do you want to send an error report to Microsoft?" window). What is driving me INSANE is that it does not seem to be a particular action that causes the crash; therefore, I am at my wits' end to try to figure out what the problem is. >:-<
Generally, the form has two subforms. The user chooses item(s) from each subform (by clicking a checkbox), then clicks a button which runs several queries and then requeries the subforms. Clicking this button is what typically causes Access to crash (although, to be honest, it sometimes crashes when I do other things as well, but the most common action is clicking this button).
I read about memory leak and made sure that I closed all open recordsets and set them to nothing. I also tried monitoring the "CPU usage" window to see if there seemed to be a cumulative growth in memory usage, but this does not seem to be the case. While the CPU usage does seem to spike pretty high while queries are run, etc. (up to 75-80%), it always returns to 0% (or thereabouts) after the processing is done. So I suspect it is not memory leak.
I know that this description is awfully vague for anyone to help, but I guess the essence of my question is: does anyone know of some sort of cumulative problem that might be occurring in my database, where I could perform the same actions 10 times in a row (for example) without a problem, but then on the 11th time Access would crash?
I have tried several things, such as: entering "DoEvents" lines into the code (to make sure that one action was not "tripping over" the previous action); unbinding the subforms during queries and re-binding them when the queries were done; etc. I also tried putting a breakpoint at the first line of the cmd button code and then stepping through the code every time I clicked on it. When I am in debugging mode like this, I can never get Access to crash. Again, this leads me to believe there is some kind of cumulative (memory or otherwise) issue that is occurring in the real-time environment, that doesn't happen in a debugging environment (?).
I know this is not a great explanation and would be happy to post any code from my application, but after poring over my code I think it must be something more generic than a code issue. I know it's a stab in the dark but I'm hoping someone has had a similar problem and might have an idea that will help.
Thanks in advance
I don't think my application is overly large - 10 tables, about 50 forms. The majority of the user's time will be spent in one form. When I try to use this form in a test situation, it frequently crashes Access altogether (with the "Access has experienced an error and needs to close... Do you want to send an error report to Microsoft?" window). What is driving me INSANE is that it does not seem to be a particular action that causes the crash; therefore, I am at my wits' end to try to figure out what the problem is. >:-<
Generally, the form has two subforms. The user chooses item(s) from each subform (by clicking a checkbox), then clicks a button which runs several queries and then requeries the subforms. Clicking this button is what typically causes Access to crash (although, to be honest, it sometimes crashes when I do other things as well, but the most common action is clicking this button).
I read about memory leak and made sure that I closed all open recordsets and set them to nothing. I also tried monitoring the "CPU usage" window to see if there seemed to be a cumulative growth in memory usage, but this does not seem to be the case. While the CPU usage does seem to spike pretty high while queries are run, etc. (up to 75-80%), it always returns to 0% (or thereabouts) after the processing is done. So I suspect it is not memory leak.
I know that this description is awfully vague for anyone to help, but I guess the essence of my question is: does anyone know of some sort of cumulative problem that might be occurring in my database, where I could perform the same actions 10 times in a row (for example) without a problem, but then on the 11th time Access would crash?
I have tried several things, such as: entering "DoEvents" lines into the code (to make sure that one action was not "tripping over" the previous action); unbinding the subforms during queries and re-binding them when the queries were done; etc. I also tried putting a breakpoint at the first line of the cmd button code and then stepping through the code every time I clicked on it. When I am in debugging mode like this, I can never get Access to crash. Again, this leads me to believe there is some kind of cumulative (memory or otherwise) issue that is occurring in the real-time environment, that doesn't happen in a debugging environment (?).
I know this is not a great explanation and would be happy to post any code from my application, but after poring over my code I think it must be something more generic than a code issue. I know it's a stab in the dark but I'm hoping someone has had a similar problem and might have an idea that will help.
Thanks in advance