Form Saving Issue (1 Viewer)

MattBaldry

Self Taught, Learn from the Forums
Local time
Today, 01:56
Joined
Feb 5, 2019
Messages
293
Hi All,

I have a database that works fine. Apart from 1 form which now takes over an hour to save. Every other form is fine. Instant saves. But this one just locks all office apps on my PC while it saves. I have recreated the form from scratch, and it stays the same. There is a near identical form that uses all the same VBA, and this has no issues saving.

Has anyone encountered anything like this before?

~Matt

EDIT: This is when I am making changes and saving from design view, and not a data save. This form is used only to display list boxes. There is no source for this form.

EDIT EDIT: I have turned off the Name AutoCorrect option as I had seen somewhere that this caused slow saves.
 
Last edited:

Minty

AWF VIP
Local time
Today, 01:56
Joined
Jul 26, 2013
Messages
10,371
When you say Save, do you mean the form from design view, or saving a record from the form?
 

MattBaldry

Self Taught, Learn from the Forums
Local time
Today, 01:56
Joined
Feb 5, 2019
Messages
293
When you say Save, do you mean the form from design view, or saving a record from the form?
Hi Minty,

I mean saving a design change. I shall update the main post.

~Matt
 

Gasman

Enthusiastic Amateur
Local time
Today, 01:56
Joined
Sep 21, 2011
Messages
14,310
Well if that other form works fine and is nigh on identical, why not take a copy of that and amend to suit.
 

MattBaldry

Self Taught, Learn from the Forums
Local time
Today, 01:56
Joined
Feb 5, 2019
Messages
293
Well if that other form works fine and is nigh on identical, why not take a copy of that and amend to suit.
Hi Gasman,

That is what I did to create the new form, which is why the codes are all the same. The only difference between the 2 would be the source query to the main listbox used on both.

If I use the old version of the form and use the new query source, it still saves fast. It has really boggled me. It has now been stuck saving since 09:32, and it is 11:55 where I am.

If I had hair, I would have pulled it all out by now.....

~Matt
 

isladogs

MVP / VIP
Local time
Today, 01:56
Joined
Jan 14, 2017
Messages
18,235
Almost certainly this is an indication of corruption. Not in your code which is replicated elsewhere, but in one or more form controls.
 

Gasman

Enthusiastic Amateur
Local time
Today, 01:56
Joined
Sep 21, 2011
Messages
14,310
Try a decompile and recompile?
Upload enough of the DB with instructions on how to recreate the issue.

Have you just tried on another computer? Just trying to identify where the fault may lie?
 

MattBaldry

Self Taught, Learn from the Forums
Local time
Today, 01:56
Joined
Feb 5, 2019
Messages
293
I am still stuck in the save mode, and I finish at 1pm, so I am going to revisit this on Monday.

I am going to take a backup of the form, then delete all controls. If the save speeds up, I will add them back, 1 by 1, to see which one has ruined my Friday.

In all my time using Access, this is the first time I have ever had this issue.

~Matt
 

Minty

AWF VIP
Local time
Today, 01:56
Joined
Jul 26, 2013
Messages
10,371
If it is corruption, delete the offending form, compact and repair, save the database and then close.
Then decompile, save, compile and save and close.

Finally recreate the new form, and just for good measure call it something slightly different.

That should remove all trace of it, and get you going again.
 

isladogs

MVP / VIP
Local time
Today, 01:56
Joined
Jan 14, 2017
Messages
18,235
Its something I've had happen occasionally over the past 25+ years.
Usually after Access crashed due to a major error but also at least once following a power failure.
If you say you already have a near identical form that works fine, I would just write off this one. Delete it and forget it.
 

Pat Hartman

Super Moderator
Staff member
Local time
Yesterday, 20:56
Joined
Feb 19, 2002
Messages
43,293
You can export the form to text. Delete it from the database. Compact. Then reimport the text version of the form.

Code:
Public Sub ImportForm()
    Application.Application.LoadFromText acForm, "Form_frmProcessPayments", "C:\Pat\RAS\TextFiles120926\Form_frmProcessPayments.txt"
End Sub
Public Sub ExportForm()
    Application.SaveAsText acForm, "frmCodeTablesHdr", "C:\TempPat\Form_frmCodeTablesHdr.txt"
End Sub
This usually removes any corruption.
 

MattBaldry

Self Taught, Learn from the Forums
Local time
Today, 01:56
Joined
Feb 5, 2019
Messages
293
Just to throw more brown smelly spanners into working fans please see below for more information.

If I take a copy of the form and save it "Copy of frmBarcodeProductionManagement" and edit this form I do not get the save issue.

If I then rename the corrupted form to "frmBarcodeProductionManagementOLD" and edit it, I do not get the save issue.

Once I rename any of these forms to "frmBarcodeProductionManagement" I get the save issue.

I even copied the form. Deleted all controls and removed the module. It worked fine until I renamed it, then the issue occurred.

The database file is generally around 3mb. When this form is being saved, it hit nearly 1gb in size.......

Weird.......

Sadly, I do not have the spare time to do the edits that are needed due to other commitments, so this is on the back burner for a while now.

Just wanted to update with these very very strange findings.

~Matt
 

Pat Hartman

Super Moderator
Staff member
Local time
Yesterday, 20:56
Joined
Feb 19, 2002
Messages
43,293
If you have the Name AutoCorrect (or Name AutoCorrupt) "feature" turned on, turn it off. Compact/decompile/compact
One file is a suggested solution to remove the corruption. The second explains how the "feature" works. This is a dangerous feature. If you don't understand it completely, it is best to turn it off. You can then turn it back on if you want it to help you to propagate a name change.
 

Attachments

  • NameAutoCorrectDocumentation.zip
    93.2 KB · Views: 72

Users who are viewing this thread

Top Bottom