Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Saved changes on forms and vb script revert back to original in access 2007

Posted on 2011-03-03
2
Medium Priority
?
368 Views
Last Modified: 2012-05-11
Dont know if anyone else has come across this problem (you have had to right?) but when I make a change in my vb script for an access form, it asks me to save the changes. I get the save dialogue to save changes for multiple items and I of course say yes. However, AS SOON AS I CLOSE THE FORM, the changes revert back to the original state. What is causing it to do this?
save-changes.png
0
Comment
Question by:jtovar3
2 Comments
 
LVL 85

Accepted Solution

by:
Scott McDaniel (Microsoft Access MVP - EE MVE ) earned 2000 total points
ID: 35032866
In many cases this is a sign of corruption. I'd do this:

1) Make a backup
2) Compact your databse - click the Office Button - Manage - Compact

If that doesn't work you can build a new, blank database and Import everything to that new database. To do that, after building the new db click the External Data tab group, select Access and Import everything into your new database. Make sure to remake any referneces, if needed.

If that doesn't work you may have an object that is corrupt. You can try a Decompile, which can sometimes recover these items. To do that, build a shortcut with this as the Target:

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

Run this, and then open the database. Open the VBA Editor and click Debug - Compile. Fix any errors, and continue doing this until the menuitem is disabled.

After doing that, you should again Compact and Import into a New database, as described above.
0
 

Author Closing Comment

by:jtovar3
ID: 35037996
I think it had something to do with something being open. Your recommendation was excellent, but I managed to get by with closing everything and only editing the VB script and saving that. Weird.

Thanks!
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

We live in a world of interfaces like the one in the title picture. VBA also allows to use interfaces which offers a lot of possibilities. This article describes how to use interfaces in VBA and how to work around their bugs.
In a use case, a user needs to close an opened report by simply pressing the Escape (Esc) key. This can be done by adding macro code in Report_KeyPress or Report_KeyDown event.
In Microsoft Access, learn how to “cascade” or have the displayed data of one combo control depend upon what’s entered in another. Base the dependent combo on a query for its row source: Add a reference to the first combo on the form as criteria i…
What’s inside an Access Desktop Database. Will look at the basic interface, Navigation Pane (Database Container), Tables, Queries, Forms, Report, Macro’s, and VBA code.

824 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question