Solved Code not save when at runtime

I can't help but press Ctrl-S every few seconds (and compile first).
Tip: you can run Compile from the keyboard (and Comment and Uncomment block).

• Put your IDE menus into design view
• Drop a toolbar command onto the main menu
• Customize the name to include an ampersand (&) character preceding the key you want as a short-cut
• Return menus to normal
• Hit <Alt>, release <Alt>, then hit < your short-cut key >

As per the image below, to compile I hit <Alt>, release <Alt>, and hit <L>.

So my "every ten seconds or so" pattern is...
• <Ctrl>+S
• <Alt>
• L

Screenshot 2025-12-16 112101.png
 
1766067588195.png


Dear all, I have finally come across a post by someone who seems to be experiencing the same problem that I have. Basically, I believe that Access crash and restart so smoothly that I had no idea that the relaunched instance is locked down by the 'Admin' and after many more hours of work, I may or may not be able to save the app. I am also working on office automation right now and the problem mostly shows up as being blocked by another user, despite there being only I who was working on it. It has taken me a long time to suspect this was due Access restarting itself, but I have no way of verifying it. You know how it is with a random and not infrequent problem with an app you are working on, I have started to dismantle some of the work I have done, test some new scripts until the original codes are barely recognizable, and I may or may not be able to just replace the codes with an original because I would want to keep some of the patchy work. On some lonely, I would be frantically trying to recover the app from the injury I afflicted it with in my attempt nail down the problem.

Anyway, the post I copied from the writer's Facebook brings such relief, I am no longer alone in my experience , and I am not imagining things and am probably still sane. Can anyone shed light on this? I strongly feel it is a Win 11 thing, you know, the particular kind of meddling in other people's otherwise uneventful lives that so characterises Microsoft...
 
View attachment 122661
Dear all, I have finally come across a post by someone who seems to be experiencing the same problem that I have. Basically, I believe that Access crash and restart so smoothly that I had no idea that the relaunched instance is locked down by the 'Admin'
and after many more hours of work,
I may or may not be able to save the app. I am also working on office automation right now and the problem mostly shows up as being blocked by another user, despite there being only I who was working on it. It has taken me a long time to suspect this was due Access restarting itself, but I have no way of verifying it. You know how it is with a random and not infrequent problem with an app you are working on, I have started to dismantle some of the work I have done, test some new scripts until the original codes are barely recognizable, and I may or may not be able to just replace the codes with an original because I would want to keep some of the patchy work. On some lonely, I would be frantically trying to recover the app from the injury I afflicted it with in my attempt nail down the problem.

Anyway, the
This is indeed a potential problem and one I've encountered recently.

The solution is to NOT continue uninterrupted coding over an extensive period without regular, frequent saves.

If you are actually working many hours between saves, maybe a different approach would be in order.
  • Start Access and immediately make a "pre-work state" backup of the accdb on which you are going to work.
  • At frequent intervals--say 3-5 minutes--save your work by
    • compiling the VBA
    • saving everything.
  • At somewhat longer intervals--say 8-10 minutes--make another backup.
At worst, you'll lose the most recent changes, changes that are more easily recalled than those from several hours earlier. At best, you'll realize the problem before you've invested hours of work.
 
This is indeed a potential problem and one I've encountered recently.

The solution is to NOT continue uninterrupted coding over an extensive period without regular, frequent saves.

If you are actually working many hours between saves, maybe a different approach would be in order.
  • Start Access and immediately make a "pre-work state" backup of the accdb on which you are going to work.
  • At frequent intervals--say 3-5 minutes--save your work by
    • compiling the VBA
    • saving everything.
  • At somewhat longer intervals--say 8-10 minutes--make another backup.
At worst, you'll lose the most recent changes, changes that are more easily recalled than those from several hours earlier. At best, you'll realize the problem before you've invested hours of work.
Yes, you make a good point, thanks. But we all need to get into that deep think state where we basically forget what's around us to do our best work and that's really one of the pleasure doing coding.
 
Yes, you make a good point, thanks. But we all need to get into that deep think state where we basically forget what's around us to do our best work and that's really one of the pleasure doing coding.
Once you switch from coding to testing, you will most likely fall out of the grove. But in any case adding a save step in regular intervals will quickly become automatic.

PS: I use source control with Access and make a point to commit changes with each new feature.
 

Users who are viewing this thread

Back
Top Bottom