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

Turn confirmation on and off

Status
Not open for further replies.

medic133

Technical User
Apr 7, 2002
86
US
Within my db, I run a delete query. Access prompts the user twice for confirmation before deleting the records. I want to turn this confirmation off shortly after the db opens and then turn it back on before the db closes. I know I can do that on individual computers through Tools/Options/Edit/Confirmation on the menu bar, but my db will be used by more than one computer. Is there any way of doing this in code? I've looked under the many options with the RunCommand function, but I don't see anything that looks like its what I want. Please include any code I might need if the solution involves the RunCommand because I've never used that function before. If it matters, I don't know if you would call it a server or mainframe or what that the database may finally reside on. Thanks in advance!!
 
DoCmd.SetWarnings = False
Or you can create a macro that will do the same thing
 
Remember to

DoCmd.SetWarnings = True

after you have run your delete query ... otherwise you never see a warning again until you log off and log back on
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top