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

No Prompt When Deleting Records 1

Status
Not open for further replies.

alexbel

Technical User
Jun 27, 2004
77
US
Hi,

I use the following code to delete records from a table:

Code:
DoCmd.RunSQL "Delete * from tblTable"

Everytime this code runs, it prompts me if I am sure I want to delete all the records. How can I remove this prompt?

Thank you
 
[tt]docmd.setwarning false
DoCmd.RunSQL "Delete * from tblTable"
docmd.setwarning true[/tt]

- or try:
[tt]currentdb.execute "Delete * from tblTable"[/tt]

Roy-Vidar
 
...should have been an "s" at the end of setwarnings, too

Roy-Vidar
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top