Access forces you to save query

C

Chris

I am trying to solve a problem that I have noticed in the
past few days. I typically create a lot of ad-hoc query's,
obtain the results, and then close the query without
saving. Lately this is not an option, when I click the X
button in the corner of the query a "Save As" box comes up
and does not allow me to close without saving. Any
thoughts?
 
D

Dirk Goldgar

Chris said:
I am trying to solve a problem that I have noticed in the
past few days. I typically create a lot of ad-hoc query's,
obtain the results, and then close the query without
saving. Lately this is not an option, when I click the X
button in the corner of the query a "Save As" box comes up
and does not allow me to close without saving. Any
thoughts?

I suspect that somewhere in the database there is code that uses the

DoCmd.SetWarnings False

statement to turn off the automatic warnings in order to do some data
manipulation without warning the user. But then it fails to turn
warnings back on again with

DoCmd.SetWarnings True

So you are left in a state in which Access won't display its "Do you
want to save ...?" warning prompt, but just assumes you want to do it.

Wherever you turn warnings off, you must exercise care to ensure there's
no way code can exit your procedure, even if an error occurs, without
turning warnings back on again.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top