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

Welcome to UtterAccess! Please ( Login   or   Register )

Custom Search
 
   Reply to this topicStart new topic
> Access Glitch Regarding Saving Code Changes, Any Version    
 
   
ngins
post Feb 19 2019, 03:50 AM
Post#1



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


Found a troubling glitch in Access 2019 (and possibly other versions) regarding saving code changes.

Go to a code window, make a change, and then go to File, Save As, Back Up Database, and click the Save As button. You are prompted as to whether you want to save changes to your code module, which is correct.

Now create a new query, but don't save it. Then make a change to a code module.

Now, before doing the backup file steps, first press Ctrl+S in the code module to save the code. Access asks if you want to save changes to the two objects -- the code module and the unsaved query. Click Yes with both objects highlighted.

Access will then prompt you for the name to save the query as. Click Cancel there.

So now, nothing has yet been saved because we cancelled out of the save.

Now go to File, Save As, Back Up Database, and click the Save As button. This time you are not prompted if you want to save the code module. The database is closed and a backup copy is made, and then the database is reopened. Your code changes are lost.

Note that this doesn't happen with the manual closing of the database. If you do Ctrl+S in a code module, and then cancel when it prompts you for the query name, Access still knows that there are unsaved objects, and will prompt you if you want to save when you manually close the database.

However, if you perform those steps before doing a file backup, then Access loses track of the fact that there are unsaved objects, and your changes are lost.

This may seem like an obscure test, but it's not obscure at all. It actually happens to me a lot. I will make changes to code and press Ctrl+S to save my code, only to be prompted to save an unsaved query that I have no intention of saving. Oftentimes I'll just click Yes, and then cancel out when prompted for the query name, and then manually close the query without saving it. I then rely on Access to remember that there is unsaved code to be saved if I do a File, Save As, Backup File. But, unfortunately, it doesn't.

--------------------
Neil
Accessing since '96
Go to the top of the page
 
DanielPineault
post Feb 19 2019, 05:35 AM
Post#2


UtterAccess VIP
Posts: 6,899
Joined: 30-June 11



For what it's worth, I've reported it to the Dev Team. If you want you can post it to the access.uservoice.com or use the Feedback button with the application itself.

--------------------
Daniel Pineault (2010-2019 Microsoft MVP, UA VIP, EE Distinguished Expert 2018)
Professional Help: https://www.cardaconsultants.com
Free MS Access Code, Tips, Tricks and Samples: https://www.devhut.net

* Design should never say "Look at me". It should always say "Look at this". -- David Craib
* A user interface is like a joke, if you have to explain it, it's not that good! -- Martin LeBlanc


All code samples, demonstration databases, links,... are provided 'AS IS' and are to be used at your own risk! Take the necessary steps to check, validate ...(you are responsible for your choices and actions)
Go to the top of the page
 
ngins
post Feb 19 2019, 09:00 PM
Post#3



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


Thanks for reporting it! I didn't see a place to file a bug report at access.uservoice.com. But I did submit it via the Feedback button (which I previously didn't know existed, so thanks for that as well).

--------------------
Neil
Accessing since '96
Go to the top of the page
 
DanielPineault
post Feb 20 2019, 07:56 AM
Post#4


UtterAccess VIP
Posts: 6,899
Joined: 30-June 11



QUOTE
I didn't see a place to file a bug report at access.uservoice.com


You just create a new suggestion in which you elaborate the issue requesting they address it. Then you cross your fingers, and hope that between now and the day you die, they actually listen to you.



--------------------
Daniel Pineault (2010-2019 Microsoft MVP, UA VIP, EE Distinguished Expert 2018)
Professional Help: https://www.cardaconsultants.com
Free MS Access Code, Tips, Tricks and Samples: https://www.devhut.net

* Design should never say "Look at me". It should always say "Look at this". -- David Craib
* A user interface is like a joke, if you have to explain it, it's not that good! -- Martin LeBlanc


All code samples, demonstration databases, links,... are provided 'AS IS' and are to be used at your own risk! Take the necessary steps to check, validate ...(you are responsible for your choices and actions)
Go to the top of the page
 
isladogs
post Feb 20 2019, 08:51 AM
Post#5


UtterAccess VIP
Posts: 1,680
Joined: 4-June 18
From: Somerset, UK


I don't see this as a bug.
You had all objects selected then you cancelled...so you cancelled saving all objects.

When you are asked about saving, deselect the items you don't want to save then click OK.
Then you will have no problems.
This post has been edited by isladogs: Feb 20 2019, 08:53 AM

--------------------
Go to the top of the page
 
ngins
post Feb 20 2019, 10:37 AM
Post#6



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


Yes, I understand how saving works. The problem is, when you choose to not save something, you still have an unsaved object open that should still be prompted for, even if you choose at an earlier time not to save it.

Furthermore, if you do those same steps, but instead of doing a backup, you start to manually close the database, then you ARE promoted to save the objects the second time, even after cancelling the save the first time, which is correct.

So this is definitely a bug. Access should not not prompt you for a save just because you previously cancelled a save.

--------------------
Neil
Accessing since '96
Go to the top of the page
 


Custom Search


RSSSearch   Top   Lo-Fi    13th October 2019 - 11:00 PM