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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Preventing Prompts when running sql from macros

Status
Not open for further replies.

Eduu

Programmer
Feb 9, 2006
17
YU
I created a macro that has a RunSQL action in it. Everytime it runs I'm prompted to verify that I want to allow these changes to the database. How do I stop the prompts from popping up?
 
Do this before the code that runs your SQL
DoCmd.SetWarnings False
now i run my code in this space and then after it's all said and done
DoCmd.SetWarnings True

I hope that this helps! It works for me every time!

-Josh ------------------
-JPeters
These things take time...
Got a helpful tip for Access Users? Check out and contribute to 'How to Keep Your Databases from becoming Overwhelming!'
thread181-293590
jpeters@guidemail.com
------------------
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top