Delete a table in Access

Is there a way to click a button that will run an querry that will delete a table in access? If so, what is the coding of the querry?

Who is Participating?
Rey Obrero (Capricorn1)Commented:
place this code in the click event of the button

currentdb.execute "drop table tableX"

change tableX with the name of table you want to delete
Rey Obrero (Capricorn1)Commented:
to delete "records" from a table

currentdb.execute "delete * from TableX"
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.