UtterAccess.com
X   Site Message
(Message will auto close in 2 seconds)

Welcome to UtterAccess! Please ( Login   or   Register )

Custom Search
2 Pages V < 1 2  (Go to first unread post)
   Reply to this topicStart new topic
> VBA Changes Not Being Saved, Access 2010    
 
   
ngins
post Jan 11 2017, 06:39 AM
Post#21



Posts: 298
Joined: 18-August 05
From: DFW, TX, USA


OK, thanks. FWIW I already have my sort order set to "General - Legacy" since I work with some older databases. However, the database that the problem last manifested itself in was created in A2010, so I don't know that that would apply anyway.

--------------------
Neil
Accessing since '96
Go to the top of the page
 
River59
post Jan 11 2017, 10:48 AM
Post#22



Posts: 1,139
Joined: 7-April 10
From: Detroit, MI


I just had this happen again. I had 2 databases open on different screens. I copied a couple lines of code from one to the other. I was very careful and as soon as I pasted, I compiled the code and saved it. After I closed and re-opened the database, those 4 lines of code were not there! The second time, I compiled, saved the module, then closed the module, saved the database. It seems to have saved it the 2nd time.

Yes, Glenn, I have been following your instructions and making sure that my Option settings are what you are indicating they should be. These are '.accdb - (Access 2007 - 2013 file format)- Access'. I am working in Access 2013.

--------------------
Remember ... Armstrong, Aldrin and Collins flew to the moon and back with a computer system less complex than a modern, programmable toaster ...
Go to the top of the page
 
ngins
post Jan 11 2017, 11:10 AM
Post#23



Posts: 298
Joined: 18-August 05
From: DFW, TX, USA


I had it happen again today too. Changed the caption of a button, saved and closed the form. Later noticed the button caption was the previous caption.

The infuriating thing about this is that you don't know what else isn't saved.

I googled it and couldn't find anything about it. And, apart from you and me, no one else in this forum seems to be experiencing it. Very strange.
This post has been edited by ngins: Jan 11 2017, 11:56 AM

--------------------
Neil
Accessing since '96
Go to the top of the page
 
ngins
post Jan 11 2017, 11:55 AM
Post#24



Posts: 298
Joined: 18-August 05
From: DFW, TX, USA


Just had kind of a breakthrough. Well, not really a breakthrough, but some new information.

In the last post I mentioned the button whose caption was changed, but then when I went back later, the change was gone.

Well, I opened the database a little while ago and confirmed that the change was there. Then, with that form open, I was working on a completely different form, and closed that other form. After closing the other form, I tried to rename that form in the Navigation Pane. Pressed F2, entered the new name, and then pressed Enter. I then got the message:

"Microsoft Access cannot complete this task. You must first stop the code before continuing." (Or something like that; didn't write it down.)

Never in my life have I ever gotten that message before. And I checked in the VBA editor. There was no code running. Everything was stopped.

And it wouldn't take the change to the form name in the nav pane. So I decided to close the database and reopen it.

When I closed the database, it asked me if I wanted to save changes to the form with the button caption change (even though I don't recall making changes to that form, though maybe I did), and a code module. I said yes and allowed the database was closed.

When I reopened the database, though, the button caption that had been changed, which I confirmed was changed after closing and reopening the database was now BACK to the old caption -- the one it had before the changes were made and were saved!

So this doesn't appear to be a question of Access not saving changes, as much as reverting to an old version of the form or code at a later time! At least in this case.

I will note that I have all my databases set to Compact On Close, and I just confirmed that this one is set to that. So any old versions of the form that may have been around should've been removed when it was compacted when it was closed.

So, to recap:

1) Button caption changed, form saved.
2) Later time, button caption is old text. Caption re-changed. Form saved, database closed.
3) Later time, database is reopened, and button caption is confirmed to be the new, correct text.
4) When trying to rename a different form, get the above-noted error, close the database, confirm saving of form with button.
5) Database is reopened and button caption is back to old text again!

--------------------
Neil
Accessing since '96
Go to the top of the page
 
GlenKruger
post Jan 11 2017, 01:23 PM
Post#25


Utterly Crispy UA Forum Administrator
Posts: 8,745
Joined: 29-September 01
From: Edmonton,Alberta,Canada


I am just wondering have you done a recent update lately to Access 2010 or Access 2013?
This is a very strange thing happening. I use Access 2013 64 Bit version and cannot duplicate this behavior.
I created a 2007 database in Access 2007 and opened it up in Access 2013 and was able to make changes that saved fine iconfused.gif

For my sanity can you make a copy of the recent databases you were having problem with and change the shared mode to exclusive and try some changes and see if they save. The reason I am asking this is so I can post a question regarding this issue to the Access Team and I know what there going to ask me so the more info I have the better.

--------------------
Human nature, it is a funny thing and the hardest thing to program to prevent.
Glen Kruger KNKConsulting
MS Access MVP 2013-2017| Wrox Techincal Contributor
Go to the top of the page
 
ngins
post Jan 11 2017, 01:34 PM
Post#26



Posts: 298
Joined: 18-August 05
From: DFW, TX, USA


Yes, I have the latest version of Access 2010 32 bit (from last month), and I can't reproduce this behavior either. It just happens randomly.

Regarding seeing if changes get saved, most changes are saved. If I try to save changes, they'll take. It's just once in a while there's this fluke where it doesn't save (or, in the latest case, actually went back to a previous version after the database was closed an reopened!).

So I don't know of any way to test or reproduce this.

--------------------
Neil
Accessing since '96
Go to the top of the page
 
River59
post Jan 11 2017, 01:58 PM
Post#27



Posts: 1,139
Joined: 7-April 10
From: Detroit, MI


I'm using Access 2013 64-bit. Yes, this is random. Today I am instituting the practice of:

1. Change code, add code, etc.
2. Compile/Save module
3. Save database in design mode
4. Save database in Form View mode

I'm going to see if this doesn't help with this problem.

--------------------
Remember ... Armstrong, Aldrin and Collins flew to the moon and back with a computer system less complex than a modern, programmable toaster ...
Go to the top of the page
 
GlenKruger
post Jan 11 2017, 03:58 PM
Post#28


Utterly Crispy UA Forum Administrator
Posts: 8,745
Joined: 29-September 01
From: Edmonton,Alberta,Canada


Neil,River59 this is indeed strange behavior. pullhair.gif confused.gif iconfused.gif

--------------------
Human nature, it is a funny thing and the hardest thing to program to prevent.
Glen Kruger KNKConsulting
MS Access MVP 2013-2017| Wrox Techincal Contributor
Go to the top of the page
 
thierry
post Jan 17 2017, 02:34 PM
Post#29



Posts: 10
Joined: 10-January 12



Have you trieded to decompile your database?
Go to the top of the page
 
ngins
post Jan 17 2017, 05:27 PM
Post#30



Posts: 298
Joined: 18-August 05
From: DFW, TX, USA


As noted earlier, it's not just one database.

--------------------
Neil
Accessing since '96
Go to the top of the page
 
2 Pages V < 1 2


Custom Search
RSSSearch   Top   Lo-Fi    27th June 2017 - 05:18 AM