Shawn
asked on
refresh on form crashes db
Whenever I refresh on a particular form it crashes the entire db. I'm pretty sure it's corrupt or at least haven't been able to find out why.
can someone help me with maybe a checklist on how to resolve this?
can someone help me with maybe a checklist on how to resolve this?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Holding down Shift key is just to prevent any start up code/form from running - unnecessarily.
mx
mx
you can also save the form as text file with
Application.SaveAsText acForm, "NameOfForm", "c:\folder\NameOfForm.txt"
in the new db, retrieve the form with
Application.LoadFromText acForm, "NameOfForm", "c:\folder\NameOfForm.txt"
Application.SaveAsText acForm, "NameOfForm", "c:\folder\NameOfForm.txt"
in the new db, retrieve the form with
Application.LoadFromText acForm, "NameOfForm", "c:\folder\NameOfForm.txt"
ASKER
>>if the problem still persists, you need to create a new form.
just did this. Created new blank form, copied all controls and added recordsource, saved. Closed. Re-opened. Ctrl-G copy/pasted procedures. Saved. Compact/repair.
refreesh and still crashing.
will try to save as text now. Question: can I save it as text then import into the Same db? er, I know i can but will this help or is it just garbage out = garbage in?
just did this. Created new blank form, copied all controls and added recordsource, saved. Closed. Re-opened. Ctrl-G copy/pasted procedures. Saved. Compact/repair.
refreesh and still crashing.
will try to save as text now. Question: can I save it as text then import into the Same db? er, I know i can but will this help or is it just garbage out = garbage in?
did you create the new form in the new db?
ASKER
i created the new form in the SAME db and that didn't work. Creating the form in a new blank db now.
ASKER
created new form in new db with this Application.LoadFromText acForm, "NameOfForm", "c:\folder\NameOfForm.txt"
then dragged and dropped to current (old) db and still crashes
then dragged and dropped to current (old) db and still crashes
ASKER
I even tried earlier to put everything into new db and refresh still crashed it.
Could it be there are too many controls or something?
the system is xp sp3 and I know there were issues a while back but I thought that was resolved.
Could it be there are too many controls or something?
the system is xp sp3 and I know there were issues a while back but I thought that was resolved.
don't use the old db, as i've said in my first post, import all objects to the new db.
ASKER
>>don't use the old db,
done and still crashes
done and still crashes
<Could it be there are too many controls or something?>
in the new form that you created, start with a few controls
btw, how many controls do you have in the form?
Number of controls and sections you can add over the lifetime of the form or report = 754
in the new form that you created, start with a few controls
btw, how many controls do you have in the form?
Number of controls and sections you can add over the lifetime of the form or report = 754
ASKER
>>btw, how many controls do you have in the form?
not sure how to count but a good 100 at a glance along with 2 subforms.
not sure how to count but a good 100 at a glance along with 2 subforms.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
ok, "relatively" good news. just deleted subforms and about half the controls and no more crash.
Now to work backwards.
Now to work backwards.
try the loadfrom text, then delete one subform if the problem persists
do it again, now delete the other subform
once you find which subform is causing the problem,
create a new subform
do it again, now delete the other subform
once you find which subform is causing the problem,
create a new subform
ASKER
ok, found the suform causing havoc. Strange thing is when I open it up directly and perform a refresh it doesn't crash.
it could be the relation of the subform with the main form, codes called from main referring to the subform.. etc
ASKER
holy cow.
got it down to one control, TmpExchangeRate and it turns out it had an empty after update procedure.
Private Sub TmpExchangeRate_AfterUpdat e()
End Sub
I deleted this and no more crash. Amazing. I had no idea something like this could cause such a headache.
got it down to one control, TmpExchangeRate and it turns out it had an empty after update procedure.
Private Sub TmpExchangeRate_AfterUpdat
End Sub
I deleted this and no more crash. Amazing. I had no idea something like this could cause such a headache.
ASKER
I hope I split the points ok. The question was to help construct a checklist. I think it's a great one and will help me in the future too. I also gave points for including checking the subforms. I had no idea they could create havoc like that.
thank you,
Shawn
thank you,
Shawn
cool.
ASKER
have already done all those steps though I didn't hold the shift key while opening.
Access 2000 db running in A2002 environment. I went through every step again including the hold shift and form still crashes on refresh.
capricorn1:
I've already tried to creat a new form but perhaps I was missing something. I'll try again now and get back with results.