Button on Form to Clear All Table Records (1 Viewer)

leladavis

New member
Local time
Today, 04:31
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.
 

JANR

Registered User.
Local time
Today, 11:31
Joined
Jan 21, 2009
Messages
1,623
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
 

leladavis

New member
Local time
Today, 04:31
Joined
Jul 14, 2011
Messages
7
Thanks so much for the fast reply. That worked perfect!
 

Users who are viewing this thread

Top Bottom