Oct 15, 2007 #1 wmbb Technical User Jul 17, 2005 320 NL I want to create a button to delete all records in the table "tbltextimport". What is the code for the macro ? thanks in advance
I want to create a button to delete all records in the table "tbltextimport". What is the code for the macro ? thanks in advance
Oct 15, 2007 1 #2 PHV MIS Nov 8, 2002 53,708 FR VBA code: DoCmd.RunSQL "DELETE * FROM tbltextimport" Hope This Helps, PH. FAQ219-2884 FAQ181-2886 Upvote 0 Downvote
Oct 15, 2007 Thread starter #3 wmbb Technical User Jul 17, 2005 320 NL Thx, That was what I needed ! Upvote 0 Downvote
Oct 16, 2007 Thread starter #4 wmbb Technical User Jul 17, 2005 320 NL Running the script I get a confirmation-box. Is it possible to delete the records without the confirmation-box ? Upvote 0 Downvote
Running the script I get a confirmation-box. Is it possible to delete the records without the confirmation-box ?
Oct 16, 2007 #5 JerryKlmns IS-IT--Management Feb 7, 2005 2,062 GR 'No warnings Docmd.SetWarnings False 'Warnings are back DoCmd.SetWarnings True Upvote 0 Downvote
Oct 16, 2007 #6 HarleyQuinn Programmer Jan 15, 2003 4,769 GB Have a look at DoCmd.SetWarnings. DoCmd.SetWarnings False will turn them off. I'd recommend only turning it off for specific operations, and the re-enabling it after the operation has been performed. Hope this helps HarleyQuinn --------------------------------- Get the most out of Tek-Tips, read FAQ222-2244 before posting. Upvote 0 Downvote
Have a look at DoCmd.SetWarnings. DoCmd.SetWarnings False will turn them off. I'd recommend only turning it off for specific operations, and the re-enabling it after the operation has been performed. Hope this helps HarleyQuinn --------------------------------- Get the most out of Tek-Tips, read FAQ222-2244 before posting.
Oct 16, 2007 #7 HarleyQuinn Programmer Jan 15, 2003 4,769 GB Too fast Jerry... HarleyQuinn --------------------------------- Get the most out of Tek-Tips, read FAQ222-2244 before posting. Upvote 0 Downvote
Too fast Jerry... HarleyQuinn --------------------------------- Get the most out of Tek-Tips, read FAQ222-2244 before posting.
Oct 16, 2007 #8 JerryKlmns IS-IT--Management Feb 7, 2005 2,062 GR You added some recommendation flavor there, resulting in extra time to taste. Upvote 0 Downvote
Oct 16, 2007 #9 HarleyQuinn Programmer Jan 15, 2003 4,769 GB Haha HarleyQuinn --------------------------------- Get the most out of Tek-Tips, read FAQ222-2244 before posting. Upvote 0 Downvote
Haha HarleyQuinn --------------------------------- Get the most out of Tek-Tips, read FAQ222-2244 before posting.