Want to delete all records in a table? How?

  • Thread starter Thread starter Lauri
  • Start date Start date
L

Lauri

I am a rookie. I used to program in Dbase and the
language is totally different from VB. Can someone please
tell me how to delete all records in a table via the VB
immediate command line? Thanks!
 
Use a Delete query statement.

In the Immediate window:
dbEngine(0)(0).Execute "DELETE FROM MyTable;", dbFailOnError
where MyTable represents the name of your table.
 
-----Original Message-----
Use a Delete query statement.

In the Immediate window:
dbEngine(0)(0).Execute "DELETE FROM MyTable;", dbFailOnError
where MyTable represents the name of your table.

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

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




.
Thanks so much, Allen!
 

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

Back
Top