Recurrent bug in Multiple Access versions--Save As|cancel dialog

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have run across this bug in AC '97 ,2000, and 2003. Does anybody know how
to fix it?
Build a throwaway form, report or query. Close it. The save as dialog
occurs. THE CANCEL BUTTON HAS NO EFFECT --grrr!
It is supposed to close the object discarding changes--since it was a new
object, nothing should be saved.
Instead nothing happens. The object must be saved and then deleted from the
database window. My Access 2003 was good for about 6 weeks before this
happened.
Anybody know how to fix this?

Nick
 
(e-mail address removed)...
I have run across this bug in AC '97 ,2000, and 2003. Does anybody know
how
to fix it?
Build a throwaway form, report or query. Close it. The save as dialog
occurs. THE CANCEL BUTTON HAS NO EFFECT --grrr!
It is supposed to close the object discarding changes--

Says who? For ten years it has worked as above?

Read carefully the question being asked by that prompt
since it was a new object, nothing should be saved.

What difference does it make if it is a new, or a old object?

If do NOT want to save, then answer "no" to the question. The question is
in plain English: says:

Do you want to save changes to the design of form <whatever>

If you answer yes, then you are changes are saved (and, if it is new form,
of course you have to choose a to saved to).

If you do not want to save, then you answer no...and it will not save.

So, what does cancel do? Well, if you don't want to save, and don't want to
"not" save..you choose the 3rd option to cancel.

If you don't save, and you don't choose to NOT save, then what should cancel
do? It simply cancels your action..and in effect does nothing. I mean,what
hat happens if you accidentally close the form..and don't want to save, and
don't want to close the form? (you simply cancel).

I mean, what happens when I don't want to save, and I don't want to NOT
save......cancel is the only 3rd alternative here.

If you want to discard changes to the form, then simply answer no the
prompt. However, you might not want to close the form..and that is what
cancel does...
 
Nick Meyer said:
I have run across this bug in AC '97 ,2000, and 2003. Does anybody
know how to fix it?
Build a throwaway form, report or query. Close it. The save as
dialog occurs. THE CANCEL BUTTON HAS NO EFFECT --grrr!
It is supposed to close the object discarding changes--since it was a
new object, nothing should be saved.
Instead nothing happens. The object must be saved and then deleted
from the database window. My Access 2003 was good for about 6 weeks
before this happened.
Anybody know how to fix this?

It took me a minute, but I think now I know what you're talking about.
The key realization is that there is a dialog you are not seeing, that
should come before the Save As dialog. There is a warning message that
you should normally get first; it will say something like

Do you want to save changes to the design of <object type> <object
name>?

with buttons Yes, No, and Cancel. In this dialog, clicking Yes brings
up the Save As dialog, if it's a new object, while clicking No closes it
without saving, and Cancel keeps the object open.

If you click Yes, so that the Save As dialog is displayed, then clicking
Cancel in that dialog is *not* "supposed to close the object discarding
changes", as you think. Instead, it's supposed to cancel the close, and
that's what it does.

Now, by this point you're saying, :"If Dirk isn't full of hooey, why am
I not seeing this warning message he's talking about?" My guess is
that, somewhere in your database, you have a VBA statement

DoCmd.SetWarnings False

that isn't balanced by a corresponding

DoCmd.SetWarnings True

Note that you may have the statements paired like this:

DoCmd.SetWarnings False
' ... code between ...
DoCmd.SetWarnings True

and you could still end up with warnings turned off, if an error occurs
in the "code between" that prevents the warnings from being turned back
on. That's why the SetWarnings method must be used sparingly and with
good error-handling in place to ensure that there is no way to get out
of the procedure without turning warnings back on again.

When warnings are turned off, that warning dialog isn't displayed, and
the default button for the dialog is assumed to have been clicked. In
this case, that would be the Yes button. So, with warnings turned off,
you get the behavior you describe.

You can try this out, by the way. Create a new object as you described,
and then -- before trying to close it -- press Ctrl+G to open the
Immediate Window, and in that window enter the line

DoCmd.SetWarnings True

I'll bet you see the warning dialog.

I haven't heard of any bug that causes the warnings setting to be
ignored or permanently set off, so I'm guessing that this is something
your own code is doing.
 
Back
Top