Forum Discussion
MS Access 2010 crasing on moving from Form Open to Form Design
Hi Dave,
If you can narrow it down to one or a few problematic forms, then you have at least 3 options:
- replace the form from an old copy
- recreate the form, you can copy the text code over, usually also the non-complex controls
- If 1+2 are too laborous, you can try to export the form as text, then delete it, compact the db and reimport the form. This procedure often removes corruptions from forms (or other Access objects). It can be done from the immediate window with
'export
Application.SaveAsText acForm, "MyForm", "c:\MyForm.txt"
'import
Application.LoadFromText acForm, "MyForm", "c:\MyForm.txt"
Servus
Karl
Access News
Access DevCon
Application.SaveAsText acForm, "MainOptions", "c:\MyForm.txt"
I got the error message:
Our Garden Database can't open the file "c:\MyForm.txt"
The forms was open in VB View to access the Immediate window.
I copied and pasted your command and just altered the Form name
Where am I going wrong?
Dave
- Sep 08, 2022
Hi Dave,
My example path might not have been the best example. 😉
The root folder of c: by default is forbidden in Windows. Instead use any drive/path you are allowed to use in your system or e.g. the same path as the db with:
Application.SaveAsText acForm, "MainOptions", CurrentProject.Path & "\MainOptions.txt"
Servus
Karl
Access News
Access DevCon- Dave_EyleySep 09, 2022Copper ContributorHi Karl,
Well, I've checked the text dump and found nothing out of the ordinary. It was rather a long read too.
I've found that the problem is intermittent and less if I steer clear of the top of the form bar when selecting Form View/Form Design etc.
It's strange how the crash occurs when the VBA code isn't active.
I'm going to soldier on for a while and see if anything changes - who knows, there might be an update to cure the problem any day soon, although I won't hold my breath.
Thanks for your help.
Dave- Sep 09, 2022
Hi Dave,
Just to explain the text export:
With reports it is really sometimes about seeing stored printer setup garbage there and deleting it. With forms, on the other hand, it's hardly ever about reading the text dump. Usually you don't see anything special there and that's good. It's mostly about text export + delete/compact + text reimport to clean up the binary lump in the system table where Access stores these objects.
Servus
Karl
Access News
Access DevCon