How to delete all records in a table

dbaldwin

Registered User.
Local time
Today, 16:01
Joined
Feb 13, 2011
Messages
40
I an about to write some VBA code, where following some procedures, I will want to delete all record from a table to start fresh the next time I run the code. How can I accomplish this?
Thank you in advance for your kind attention to this inquiry.
 
DoCmd.RunSQL "Delete * From [TableName]"
 
Thank you so much.
 
Thank you so much.

No problem. Know that if you're dealing with a table of considerable size, deleting the table often will cause the size of the database to balloon and become potentially unstable. Make sure you're performing proper maintenance via Compact/Repair.
 

Users who are viewing this thread

Back
Top Bottom