Button on Form to Clear All Table Records

leladavis

New member
Local time
Today, 07:33
Joined
Jul 14, 2011
Messages
7
Can someone please suggest the VBA code to use on a button in a form that would delete all the records from a table called "tbl_FMC_List"?

I am the only person using this form so I just want to click the button and clear all the records from the table.
 
Currentdb.Execute "Delete * From tbl_FMC_List", dbFailOnError

will remove all records, perhaps you should give your self a chance to stop deleting with a msgbox in case you accedently click on your button

JR
 
Thanks so much for the fast reply. That worked perfect!
 

Users who are viewing this thread

Back
Top Bottom