Forms not saving

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I upgraded a Access 2003 MDB to Access 2007 accdb format. I've tried to make
some modifications to some form designs, but the forms will not save the
design changes. When I close the form I am prompted if I want to save the
changes and when I say yes the dialog box goes away, but the form stays
visible and the changes are not saved. I get no error messages. The only way
to close the form is to click no when promted to save changes.
I can create and save new forms without a problem. I can also save and
modify data without any issues.
Can anyone help me?
 
There must be something wrong with the database. Since you were able to
convert to ACCDB format, I'll assume we are not talking about a problem with
security (MDW, or VBA password.) I'll also assume that you are not using
other technologies here (such as Visual Source Safe.)

It may be the kind of issue that could be fixed with a decompile. This
sequence addresses several issues. Follow in order:

1. Make sure the folder where your database reside is added to the trusted
folder list:
Office Button | Access Options | Trust Center | Trust Center Settings

2. Uncheck the boxes under:
Office Button | Access Options | Current Database | Name AutoCorrect
Explanation of why:
http://allenbrowne.com/bug-03.html

3. Compact the database:
Office Button | Manage | Compact/Repair

4. Close Access. Make a backup copy of the file. Decompile the database by
entering something like this at the command prompt while Access is not
running. It is all one line, and include the quotes:
"c:\Program Files\Microsoft office\office\msaccess.exe" /decompile
"c:\MyPath\MyDatabase.mdb"

5. Open Access (holding down the Shift key if you have any startup code),
and compact again.

6. Open a code window.
Choose References from the Tools menu.
Uncheck any references you do not need.
For a list of the ones you typically need in your version of Access, see:
http://allenbrowne.com/ser-38.html

6. Still in the code window, choose Compile from the Debug menu.
Fix any errors, and repeat until it compiles okay.

7. Still in the code window, choose Options on the Tools menu. On the
General tab, make sure Error Trapping is set to:
Break on Unhandled Errors
and the Compile on Demand is unchecked.

At this point, you should have a database where the name-autocorrect errors
are gone, the indexes are repaired, inconsistencies between the text- and
compiled-versions of the code are fixed, reference ambiguities are resolved,
the code syntax is compilable, and the VBA options are set to show errors
and avoid this kind of corruption.
 
Well I didn't try all you suggested, but your post did lead me to a solution.
I must have had some VBA code attached to these forms somewhere along the way
and it didn't convert. I opened the form in design mode clicked "view code".
This created a new module with no code. I closed it and viola! the form
would now save with no problems. This method seemed to fix all of the forms I
was having trouble with.

Thanks!
 
Back
Top