Changes to Module Code not Saved on Exit - Access 2010

ted.martin

Registered User.
Local time
Today, 14:51
Joined
Sep 24, 2004
Messages
743
I have been running Axs 2007 for a few years and recently upgraded to 2010. I have noticed that when I close a module and ultimately Exit the application, any changes to my modules code is not being saved.

This never happened with 2007 but it is annoying as unless I remember to 'save' the code within the module before I Exit, then all is lost.

Surely this must be a setting issue but i cannot find it.

Thanks
 
As far as I know you have always had to save code in a module. In 2007 if you tried to exit, it would pop-up asking if you wished to save changes in the module.
 
I also have exited a module without saving, but M$oft asks if you want to save changes.

In (2000-2003) -One place where I know you cannot save changes, if you open a database that has a related Library database (in my case it was an .mda with several modules), you can temporarily adjust the sub/function in the Library, but those changes are not saved/made permanent.

I found you have to open the mda database directly, make the change and save it.
When I do this I also reset the reference to the Library database from my original database. The changes are then available.

This seems to make sense since you wouldn't want general users of the shared Library to be changing the code. Updates to shared library are controlled.
 
Thanks both; I am NOT getting the save prompt in Axs 2010; whereas I always di in Axs 2007. That's the problem. :(
 
Is it only in one database, or in all databases you have?
Have you tried to make changes to the database on another computer with MS-Access 2010 installed?
Do you have a "DoCmd.SetWarnings False" somewhere in you code, then be sure to set the warnings true again.
 
No it is not that. I have many databases but this problem occurs on all of them in 2010.

If you open a code module and change the code and then close and exit, you do not get the save prompt and the code changes are lost on application exit.

This does not happen on 2007 which I am running from home.
 
If me, I would try reinstall of MS-Access, (remove it first).
 
Check the Options.

You also have to be careful when setting warnings off in code to turn them back on. Forgetting will result in Access silently discarding changes.

attachment.php
 

Attachments

  • ConfirmChanges.jpg
    ConfirmChanges.jpg
    52.1 KB · Views: 1,539
Thank you Pat; I will try this when I get back to work on Monday. I think I have all 3 set to clear. I always use code to switch off the warnings when running Action Queries and do of course switch them back on.

The problem I describe is one when I am programming; maker a change to module code and in 2010, the code change is not saved unless I 'press save'.

In Axs 2007, I do not have to do this; my code changes are saved automatically each time.

Ted
 
What you are experiencing is a symptom of warnings being set off. The only two macros I have in all my databases are the ones I use to turn warnings off and on. I use a macro so I don't forget to include the hourglass setting also. In the WarningsOff macro, I turn the hourglass on and vice versa. That way I always have a visual clue that the warnings are off.
 

Users who are viewing this thread

Back
Top Bottom