Delete records in a table

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Good day,

How do I delete all the records in a table without deleting the table itself
via Macro.

Thanks in advance
 
CurrentDb.Execute "DELETE FROM MyTable", dbFailOnError

(replace MyTable with the actual table name)

(Note that if you have referential integrity turned on, you have to ensure
that you delete the data in the correct order)
 
Thanks for the response. All I did that worked for me was created a Delete
Query. Simple and quick.

Cheers
 
Back
Top