Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Access 2007 inists on saving queries

More of an annoyance than anything else, but I couldn't find any information on it in Google.

I'll often create a query in Access 2007 to test something, or quickly grab some results on a one time basis. I don't want to save these queries, as they're only good for one use.

Not always, but often, Access won't close this query without me saving it, which then means I have to later delete it. This can prevent me from closing Access until I've saved it, and creates a derth of unwanted queries.

Why is this happening? Is there something in particular that sets it off?

like image 345
Sinister Beard Avatar asked Apr 02 '13 10:04

Sinister Beard


Video Answer


2 Answers

The Track name AutoCorrect info path was not what did it for me. Rather it turns out I had left DoCmd.SetWarnings False set. Going into the immediate window and running DoCmd.SetWarnings True brought back the old "Do you want to save this query Yes/No/Cancel" window.

like image 72
Brad Avatar answered Sep 20 '22 03:09

Brad


If you have turned off warnings in VBA (DoCmd.SetWarnings False) but haven't turned them on later, you'll get this behavior every time. Remember that:

  1. You should always turn warnings on when you're finished with a procedure
  2. If you error out of a procedure that has turned warnings off, they're probably still off.

Try going into VBA, call up the Immediate window (Ctrl+G), type in DoCmd.SetWarnings True and hit Enter.

like image 36
tewald Avatar answered Sep 20 '22 03:09

tewald