Link to home
Start Free TrialLog in
Avatar of john8217
john8217

asked on

Can' save design changes to the form

On Access 2007 I needed to change some of the fields. First I went to the table to change them. I was able to save changes. Then I had to go into the forms to delete those fields and then put them back in (so that now it would be the updated version of those fields). I hit "save" on the form but nothing seemed to happen. When I tried to close the form it prompted me with "Do you want to save changes to the design of form whatever". I hit "yes," nothing happened. This went on over and over. The only way for me to close the form is to choose to not save the design changes.
     I opened a different form and tried deleting some other field. Same thing. I don't think its simply a matter of me having a corrupt form because I have this problem with all the forms. But it DID let me save changes to the table.
Avatar of pdebaets
pdebaets
Flag of United States of America image

Do you have exclusive access to your .accdb file that holds the form? Have all other users of the .accdb file close the application, then re-boot your computer and try it again.
Avatar of Jeffrey Coachman
My guess is that perhaps pdebaets is on the right track here


< I don't think its simply a matter of me having a corrupt form>
Ok, but you may have a corrupt "Forms Collection"


So, you can also try the  usual:

Run the Compact repair utility
Decompile the code (in the VB window, Click: Debug-->Compile)
Run the Compact repair utility again
Create a new blank database and import all of the objects
Jeff's suggestion to Decompile the code is good, but he's given you the method to COMPILE the code.

To Decompile, you build a shortcut with a Target like this:

"full path to msaccess.exe" "full path to your database" /decompile

Run that shortcut, and then go back and run the Compile

:)
Avatar of john8217
john8217

ASKER

In the VB window, when I click "Debug" on the Edit Bar, "Compile" is grayed out. Why is that?
<Jeff's suggestion to Decompile the code is good, but he's given you the method to COMPILE the code.>
LOL,,,  Good catch Scott, ...sorry about that

;-)

Jeff
... "Compile" is grayed out. Why is that?

Your module is already compiled.

You can decompile it, then re-compile. This may eliminate some problems. Please see http://peterssoftware.com/t_fixerr.htm, item "f." for more information.

Is anyone else using the database while you are trying to modify the form?
What is the format of the database? Is it a .mdb?

Is the database split?

Which Service pack level are you running with Access 2007?  At least SP2?

To gert the SP level see:  Where is the About dialog for Office 2007 applications?
Hi guys,

I didn't get a chance to try to decompile/compile code today, and its now closing time. It will have to wait until tomorrow. In the meantime, here are answers to some of your questions:

-Every time I modify the form, I first have everyone close out of that database, otherwise Access will tell me that any changes I make can't be saved. But this time when everyone was closed out, it didn't even tell me it wasn't saving. Every time I clicked "yes" to save changes it simply acted like I didn't click any of the 3 choices (yes, no, cancel).

-The database is .mdb. Years ago it was originaliy Access 2000 - hence the .mdf file format. Then we upgraded to 2007. Then just a few weeks ago we upgraded again to 2013. We never did recreate the database from scratch as an .accdb file (if that's what you were trying to find out).

-The database is NOT split. We looked into possibly doing that but determined that although it might fix some things it would also bring about additional headaches -such as the fact that EVERY time I change the design of the form, then I'd have to go around and put the new form on everyone's PC. Also, splitting the database is not something I take lightly. You need to be very careful when doing something like that, so quite frankly, I'm too scared to do that.
ASKER CERTIFIED SOLUTION
Avatar of pdebaets
pdebaets
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
I agree 100% with Peter regarding splitting the database. There's no good reason to NOT do this, and it will solve most of your issues.

Also - you should NEVER do development work on your "live" application. Instead, you should perform your development tasks on your "work" copy, then test those changes thoroughly, and then move them into production. That's almost impossible to do with a single, non-split database.
The directions for recompiling says "you can recompile the VBA code by opening any module." I don't have any modules. Can I just open a form and then do the recompiling?
You can easily create a module by clicking Create > Module.

Your form may contain a module as well. Try opening your form in design mode, then press Alt-F11. You should see the VBA IDE window appear. It will say "Microsoft Visual Basic" at the top. Here you can click Debug > Compile <my project name> to compile your project.

Did you try decompiling? Here are the instructions again: http://peterssoftware.com/t_fixerr.htm, item "f."

You should really split your database.
Just one more question. We have over 100 merge documents that are using the database as its source (not sure if that was the correct terminology). After the split I guess we'd have to reconnect the merge documents (once again, not sure if that was the correct terminology). But after that, the merging will still work fine, right, even on a split database, right?
Thanks