Run query without prompts

DAW

Registered User.
Local time
Yesterday, 20:56
Joined
Mar 22, 2006
Messages
70
(Sorry - posted to wrong forum earlier)

Normally I would run a query like using 'CurrentDb.Execute' so that no user prompt occurs, but how do I avoid prompts when I need to run an update query?.

I'm using DoCmd.OpenQuery "qry_UpdatePW" with no joy!
 
If you need to have the query use a value created by some code as the value to update to, you can build the sql statement in code and execute the sql statement...
 
Further to Kens answer. If you are referring to the "you are about to run an update query" type prompt.
You can switch off this by using the "SetWarnings" code to false. Remember to switch it on again after the query has run "SetWarnings" to True.

You can do it in VB code or via a macro

Col
 
ColinEssex said:
Further to Kens answer. If you are referring to the "you are about to run an update query" type prompt.
You can switch off this by using the "SetWarnings" code to false. Remember to switch it on again after the query has run "SetWarnings" to True.

You can do it in VB code or via a macro

Col

Didn't think of that - :)
 
KenHigg said:
Didn't think of that - :)
Its difficult to know what prompt is being referred to. It may well be a value or a warning prompt.

Its hard to say when people don't bother to give all the info needed.:rolleyes:

Col
 
Thanks chaps - the setwarnings thing was what I was after. I usually write in Excel where this would be achieved with Application.DisplayAlerts=false but the language is different in Access.
 
DAW said:
Thanks chaps - the setwarnings thing was what I was after. I usually write in Excel where this would be achieved with Application.DisplayAlerts=false but the language is different in Access.

Col has to keep me straight quite regularly... ;)

Just kidding - Glad you got want you needed...
 

Users who are viewing this thread

Back
Top Bottom