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!
 
Back
Top