Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Can't turn off query prompts - desparate for help

Status
Not open for further replies.

suziqueue

Programmer
May 10, 2001
26
0
0
US
Morning everyone, I hope your day is going better than mine. I have a
very frustrating problem that is driving me completely nuts!! I have
a macro that runs a few queries then emails a report - no problem.
Originally I set Echo and setwarning to "No" at the onset of the
macro the back to "Yes" upon completion. The user was still being
prompted for each query. I piddled with it some more checking to make
sure I didn't have some stray code that was forcing it all on. No
luck, the only bit of code was an on timer event that shuts the
database down when we update. Out of frustration I unchecked the
confirm document deletions, record changes and action queries boxes
(BIG CRINGE!!!!) The user is still being prompted!!! OK Now I'm about
to pull my hair out. So I thought "I'll fix you", I created 2
functions one to turn them off and one to turn them back on. Here's
the code:

Function ShutOff()'ran at the beginning of the macro

Dim App As Application
Set App = Application
App.SetOption "Confirm Action Queries", False
App.SetOption "Confirm Record Changes", False
App.SetOption "Confirm Document Deletions", False
End Function


Function TurnOn()'ran at the end of the macro
Dim App As Application
Set App = Application
App.SetOption "Confirm Action Queries", True
App.SetOption "Confirm Record Changes", True
App.SetOption "Confirm Document Deletions", True
End Function



When I run each function it "looks" like it is doing exactly what it
is supposed to - BUT I AM STLL BEING PROMPTED!!! Somebody PLEASE give
me a clue, anything ... What in the #$%& is going on? I have a
feeling that it's something simple - but WHAT?

BTW it Access97 - and is happening on a Win98 and a WinNt machine

I'm gonna smoke, get some coffee and cool off...

You guys are the best - I know someone out there can help!!!

Thanks everyone - Becki

 
If you mean by "query prompts" what people usually mean by query prompts then:-

First off Query prompts are not Warnings so setting Warning = Off will not stop then.

Second Off Query Prompts are not screen updates in that they are not changes to the face image of the form. So Echo Off won't stop them either.
Third & forth they are not "Record Changes or "Document Deletions" either.. ..

They usually arise becuase somewhere in your query you have specified a variable that is mis-typed ( or just does not exist ) or possibly is being interpreted as a variable when you didn't expect it to be.

What are the Parameter names that are being asked for in the prompt ?
Check the SQL version of you query and look it over in design view. Are there any square brackets where you don't expect to see them ?
Where do these Parameter names appear & where should the system find these values?


G LS
 
Ok - perhaps "Query Prompts" was not the correct terminology (sorry about that). What I am referring to is the prompts that ask you "You are about to run a query blah blah blah - are you sure you want to do this", "Table XXX is about to be deleted yadda yadda yadda are you sure you want to do this?" This is the only database that I am having this problem with. I've compacted / repaired, checked my references, even created a blank database and imported everything into it and relinked my tables. I'm so frustrated I'm about take a liquid lunch and forget about it!!
 
Yeh, me too - but for some screwy reason this database has decided it wants the user to confirm everything no matter what. I'm in the process of changing my macro to code - maybe if I mess with it long enough it'll quit acting like a spoiled teenager and do what it's told. If it was just on one computer and every database on that computer was doing it I'd figure it was an Access thing - but since it one database on every computer??????? I'm 100% stumped (and 200% frustrated!!!)

Thanks Stickarm and GLS for you responses - I'm still open for suggestions.
 
Well for all of you tuning into this saga - I finally got the database to stop asking me to confirm every query action by converting the macro to code, taking out all of the application.setoption lines, adding docmd.echo false and docmd.setwarnings false at the beginning and NOT setting them to true at the end. Who am I to question why.... But if y'all hear an extremely loud scream about 8:00 am tomorrow morning you'll know that it's back to the drawing board for me.....
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top