Quick way to emply tables from VBA ?

D

David

What is the best way to empty several tables in VBA. I'm writing a conversion routine and need to do this when I do a rerun.
 
A

Allen Browne

Supply your table names to this kind of routine:

Dim strTable As String
Dim db As DAO.Database

strTable = "[MyTable]"
dbEngine(0)(0).Execute "DELETE FROM " & strTable & ";", dbFailOnError

--
Allen Browne - Microsoft MVP. Perth, Western Australia.

Reply to group, rather than allenbrowne at mvps dot org.

David said:
What is the best way to empty several tables in VBA. I'm writing a
conversion routine and need to do this when I do a rerun.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top