Forced Saving of Queries, Forms, Reports, etc.

S

Steve K

So I have a strange scenario... I have a complex/large database broken into
a FE and BE (multiple actually). If I open the db with the Shift bypass
key... everything development wise (designing of queries, forms, reports,
etc.) works like normal. However, if I open the db and allow the main form
vba code to execute (which includes an append query from a network BE table)
and then switch to the db container and edit queries/forms/reports or create
a new one... Access will auto save any changes made (when editing) or force
me to save (when creating new). I don't get the "Do you want to save your
changes?" question. But again... I do get it if the auto exec vba code
doesn't execute. I believe I've narrowed it down to the append query. If
all the vba code except that query runs... everything works (for developing
purposes) like normal. The moment that query (or any append query for that
matter) runs... then Access starts acting weird by not confirming
changes/saves or it requires me to save (when it's new) before it will
close.

Why would it do this? And how can I get it to act normally even if the
query(ies) run?

Thanks,
Steve
 
G

Gina Whipp

Steve,

Sounds like you a DoCmd.SetWarnings False set prior to the query running but
do not have a DoCmd.SetWarnings True set after the query runs.

DoCmd.SetWarnings False 'Turn warning off
Run your query here
DoCmd.SetWarnings True 'Turn warnings back on

--
Gina Whipp

"I feel I have been denied critical, need to know, information!" - Tremors
II

http://www.regina-whipp.com/index_files/TipList.htm
 
J

Jerry Whittle

Check the code on the Autoexec macro or the main form code for a SetWarnings.

Often people will turn SetWarnings to False so something like an append
query won't ask permission. But then the forget to SetWarnings back to True
which will mess with things until the database is closed and reopened again.
 
S

Steve K

Wow do I have egg on my face. That is something so easy that I totally
overlooked. Thanks to Gina and Jerry for reminding me of that. I made the
change and voila... problem solved.

Thanks again,
Steve
 

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