Hello friends, I want to clear a table by clicking a button on a form. I have created the query to clear the table but I cannot make it the source for the command button on the form. Is this possible? Thanks for your time and help.

9 Years
Discussion Span
Last Post by Grn Xtrm

I'm sure there is a VBA approach to this, but you could also make a macro with 6 lines in it.

Make a new Macro and use the following:

SetWarnings = No
OpenTable = table you want to remove all records from
RunCommand = SelectAllRecords
RunCommand = DeleteRecord
Close = choose table and specify table you just opened
SetWarnings = Yes

After the macro is made, make a command button and assign the macro to it.

No need to use a query to do this.

Good luck

Votes + Comments
Thanks for the help.
This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.