MS Access 2010 crasing on moving from Form Open to Form Design

Copper Contributor

Hi all,

I have Office 2010 and use Access for hobby use.

Lately, the database is crashing when I click on the screen header and select Design View from a Form View. 

I have attempted to  -

Compact and Repair the database (no improvement)

Uninstalled Office 2010 and re-installed and updated (no improvement)

Checked previous dbs known to be free of the problem (no improvement)

Installed update 2553385 as recommended by Microsoft (no improvement)

 

The crash always leaves the .laccdb open which stops re-opening the db without first removing the file using Task Manager.

 

I do a lot of work on the db in my retirement, for my personal use (Garden related application) and it is a main hobby which keeps me sane and brain cells occupied.

 

Has anyone got a solution for this problem? I would really appreciate any assistance.

 

Dave Eyley

 

 

 

16 Replies

Hi,

 

To clarify the scope of the problem:

 

1. Does the crash happen only with a particular form in your db?

2. With all forms in this db?

3. With a new form in a newly created db?

 

Servus
Karl
Access News
Access DevCon

Hi Karl,

It happens, most times, When I'm changing from View to Design mode with any form in the db but not every time. It's a bit like Russian Roulette. You just never know...

The db was first started around 2013 and has been reliable until recently. A suggestion that an Office or Windows update might the cause was made on the Access World Forum. I followed an instruction to remove an update but that had no effect.

I would be grateful for any help.

Dave

Hi Dave,

 

How about question No 3?

With some testing of a new db you might be able to determine if it is a system problem or a corruption in the particular db.

 

Did you already try the usual things with corrupt dbs?

a) create a new accdb and import all objects from the old db

and/or

b) the decompile command line switch, e.g. with a shortcut and a target path like

"c:\AccessPath\msaccess.exe" /decompile "c:\YourApplicationPath\Your.accdb"

 

Servus
Karl
Access News
Access DevCon

Hi Karl,

I did create a new db and imported all the objects into it. The same result.
The database isn't compiled so I did a few Compact and Repair attempts with no effect.
I created a new db and a new form and haven't had the problem so far.

Since your last reply I have been substituting forms from previous aschives and got back to 2019 before the problem went away. Which is odd considering the bug only started a few days ago.

Now, I'm going to return to the troublesome form and start removing objects to if I can identify the nasty bit.
When, and if, I find something I will let you know.

Thanks for you help and suggestions thus far.

Dave

Hi Dave,

 

If you can narrow it down to one or a few problematic forms, then you have at least 3 options:

 

  1. replace the form from an old copy
  2. recreate the form, you can copy the text code over, usually also the non-complex controls
  3. 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

Had a problem using the Immediate window. I copied your export command to the window and changed the MyForm:

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

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

Hi 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

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

Hi Karl,

I read up about importing all databse objects into a new, blank db and tried it. It seems to have worked. I'm still going through all of thr database operations but, so far, it's looking promising.
I'd like to thank you for putting me on the right track.

Kind Regards

Dave Eyley (Plymouth - England)
Hi Karl,

It seems I was on the right track but nowhere near a destination :)

Can you list the steps for me to accomplish the full text export + delete/compact + text reimport process?

The database is callled - Garden Database.accdb - located in a folder called - C:\Access Files
I would use a temp location of C:\Documents to export the text. So, perhaps, you could show me the correct syntax for each command?

Gratefully yours

Dave Eyley


Hi,

Instead of doing this for every single object in a db I would recommend you a tool that does this for you: https://team-moeller.de/en/?Add-Ins:TM_Rebuild-Database

 

Servus
Karl
Access News
Access DevCon

Hi Karl
Used the Rebuild Add-in.
It froze both the original and the rebuild db at two points - both on forms.
Deleted the forms and continued to completion.
Rebuilt database still crashed/closed as before.

I am going to check the two forms that stopped the Rebuilder because I remember copying one from the other and making minor changes to the copied one. Maybe there is a piece of code that is problematical and I missed.

Regards

Dave Eyley



Hi Karl,

This is strange.
I rebuilt the database and when I run it from File Explorer it's fine. I can switch views with impunity.
However, when I create a desktop shortcut and run it from there, the problem returns. Same file, different launch location. A problem with Windows, possibly?
I did upgrade to Windows 11 a while back but reverted back to Windows 10 very quickly. Would that, could that have caused a glitch?

Kind Regards

Dave Eyley


Well, even that failed eventually. It looks like I'm stuck with it for a while. I'm still working on the db but hitting the Design View option is like playing Russian Roulette.

Happy Daze...

Dave Eyley
Hi Karl,
I kept searching online and found, on the Punch Technology Help Centre, the following Command Line - DISM /Online /Cleanup-Image /RestoreHealth
After I executed the command the problem appears to have resolved. I have been 3 days without a crash.
I remain ever hopeful.
I write that you may find this useful.

Kind Regards

Dave Eyley