access 2k bug?

S

Steve Huff

Anyone else seen this problem?

You create a new query - in this particular case to be exact I'm pasting in
the SQL from a code window to test it and run it - then you go to close it
and you get a "Save As" box - with the option OK and close and the default
name Query1 - you click close because you don't want to save the query you
where just testing the code syntax - and boom - the Save As box pops up again
wanting to save the Query - so you end up having to save it as Query1 then
you delete the object - why the heck is this? Why can't I just click cancel?
Is this a known bug in Access 2k?
 
M

Mauricio Silva

I've never seen that before.

When I create a Query, paste a SQL Command, and try to close it, all I get
is a message: "Do you want to save it?" Yes, no, Cancel... if I say Yes, it
asks for a name in a Window with Ok and cancel button.

This is the same in every computer I've worked.

Perhaps your Access needs to be reinstalled

Mauricio Silva
 
D

Dirk Goldgar

Steve Huff said:
Anyone else seen this problem?

You create a new query - in this particular case to be exact I'm
pasting in the SQL from a code window to test it and run it - then
you go to close it and you get a "Save As" box - with the option OK
and close and the default name Query1 - you click close because you
don't want to save the query you where just testing the code syntax -
and boom - the Save As box pops up again wanting to save the Query -
so you end up having to save it as Query1 then you delete the object
- why the heck is this? Why can't I just click cancel? Is this a
known bug in Access 2k?

This happens when you have warnings turned off, as by executing the
statement

DoCmd.SetWarnings False

With warnings turned off, the "Do you want to save?" prompt is not
displayed.

Probably you have code somewhere in your database that turns off the
warnings in order to perform some action, and omits to turn them back on
again afterward.
 
K

Ken Snell [MVP]

And to add to Dirk's good comment, often the source of the problem is that
the code goes to an error handler, which then resumes at a part of the code
after the SetWarnings are turned back on... so always be sure to include a
DoCmd.SetWarnings True as one of the last steps of the procedure through
which the code will always go!
 
S

Steve Huff

Thanks ken - that's gotta be it as the code was in break mode and I was
cutting and pasting the results of the SQL string.

-Steve
 
Top