David W. Fenton said:
Uh, why wait until you've left the code window to save the form? I
always hit Ctrl-S in the code window (after compiling) and this
saves all open unsaved objects, including the form the module
belongs to. Why do you need to leave the code window to do that?
Sure. I still need/want to close the form.
so, ctrl-w will close the form without a save prompt if I save in code
(which is usually the case). However, either way, I just hit ctrl-w to
close that form. If I get a save prompt, then I hit y. I might not
have gone into the code editor anyway...
For that matter, why do you have to close the form to force the "Do
you want to save..." dialog? Why not just SAVE IT?
Sure, that works just fine. In my case I trying to get that form closed.
So, sure I can use ctrl-s, but I usually hitting
ctrl-w anyway to close the form. My "end task" is to
get the form closed. If I hit ctrl-s in the code window....when out of the
code editor back to the form...ctrl-w will close the form for me without a
save prompt. However, hitting ctrl-w will close the form, and if I do, or do
not get a save prompt is fine for me. Often ctrl-w will not prompt me...
I will admit this is really a personal pref, and the reason is:
While ctrl + "," will flip the form into design mode, and then f5 into view
mode, I by habit "often" close the form with ctrl-w (in design mode) to save
it (and if I hit ctrl-s in code editor and just came back I still close that
form). I will then hit enter key to open that form (it will be still
highlighted in the database window(or nav pane).
The reason for closing the form (even if it saved). is that flipping the
form from design mode into view mode is often very instable for me due to so
much code being dependence on many other objects being initialized
elsewhere in the database. The form can't be really be opened on it's own.
Since there is so many class objects and variables etc. needed. So flipping
the form into view mode is often risky (access will hang, or crash). So, I
close the form first by habit to ensure it is saved. Much of this comes
down to "motor memory". If I by habit flip, then I do so by accident with
forms that most defiantly should not be launched on their own.
If access crashes or hangs when opening the form, then no big loss by
having always hit ctrl-w. (however, hitting ctrl-w means the form is
closed and saved). This could be just my personal case/experience, but I
found a good deal of instability when flipping a form from design view to
"view" when hitting f5 for "some" of my forms. So, this way always sure
that the form is safe closed and saved. I really don't have to worry/think
if this is going to be a problem for a particular form if I open it, or
bumpt the f5 key by accident before having saved the form (or just hit
f5 by habit before having saved the form).
I think if one not experienced "lack of" stability then they
will likely not close the form they had in design mode before trying to
re-open it in view mode...