Jul 21, 2004 #1 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
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
Jul 21, 2004 1 #2 RoyVidar Instructor Jun 16, 2000 6,606 NO [tt]docmd.setwarning false DoCmd.RunSQL "Delete * from tblTable" docmd.setwarning true[/tt] - or try: [tt]currentdb.execute "Delete * from tblTable"[/tt] Roy-Vidar Upvote 0 Downvote
[tt]docmd.setwarning false DoCmd.RunSQL "Delete * from tblTable" docmd.setwarning true[/tt] - or try: [tt]currentdb.execute "Delete * from tblTable"[/tt] Roy-Vidar
Jul 21, 2004 #3 RoyVidar Instructor Jun 16, 2000 6,606 NO ...should have been an "s" at the end of setwarnings, too Roy-Vidar Upvote 0 Downvote
Jul 21, 2004 Thread starter #4 alexbel Technical User Jun 27, 2004 77 US Thank you Roy. That did it! Upvote 0 Downvote