K
kagard
Greetings:
My application has a menu form that lets users jump to other forms in
the database. Switching from one particular form back to the menu
causes Access to crashes. If I close this form and return to the menu,
it's fine. If I leave it open and ctrl+f6 back to the menu form,
Access goes down hard.
The application has several dozen forms, but only one (frmProjects)
causes this problem. This is the only form that contains tabbed
subforms. I removed the subforms one at a time and found that the 10th
of 12 subforms (frmPayAppsOverview) was causing the problem.
Then I began removing controls from the subform and found that the
Amount Due text box was causing the error. It's control source is:
=GetPayAppAmtDue(Nz([lngAppNbr],0)
This calculation works properly when I display the main form and
subform. Since this function runs 3 queries and uses some domain
aggregate functions, I thought it might be causing the problem, so I
commented out the code and just had it return a value and exit. Even
so, it still crashed when I switched back to the menu.
Running the function in the Immediate window works with the menu and
project forms open.
There are no lost focus event procedures associated with the form or
subform.
The subform does contain a hidden textbox with the foreign key value
that links it o the main form.
I have compacted and repaired the database.
The users need to be able to leave this form open to gather
information as they fill out other forms and do research, or I would
just close it each time.
To sum it up, my menu and form display and calculate properly
individually. Removing an essential calculated control fixes the
problem, but isn't an acceptable solution. I've spent hours on this
and I'm out of idea.
TIA
Keith
My application has a menu form that lets users jump to other forms in
the database. Switching from one particular form back to the menu
causes Access to crashes. If I close this form and return to the menu,
it's fine. If I leave it open and ctrl+f6 back to the menu form,
Access goes down hard.
The application has several dozen forms, but only one (frmProjects)
causes this problem. This is the only form that contains tabbed
subforms. I removed the subforms one at a time and found that the 10th
of 12 subforms (frmPayAppsOverview) was causing the problem.
Then I began removing controls from the subform and found that the
Amount Due text box was causing the error. It's control source is:
=GetPayAppAmtDue(Nz([lngAppNbr],0)
This calculation works properly when I display the main form and
subform. Since this function runs 3 queries and uses some domain
aggregate functions, I thought it might be causing the problem, so I
commented out the code and just had it return a value and exit. Even
so, it still crashed when I switched back to the menu.
Running the function in the Immediate window works with the menu and
project forms open.
There are no lost focus event procedures associated with the form or
subform.
The subform does contain a hidden textbox with the foreign key value
that links it o the main form.
I have compacted and repaired the database.
The users need to be able to leave this form open to gather
information as they fill out other forms and do research, or I would
just close it each time.
To sum it up, my menu and form display and calculate properly
individually. Removing an essential calculated control fixes the
problem, but isn't an acceptable solution. I've spent hours on this
and I'm out of idea.
TIA
Keith