delete table

A

Arvin Meyer [MVP]

Anakin Moonwalker said:
Is there a DoCmd command for deleting a table?

You could do:

Dim db as DAO.Database
Set db = CurrentDb
db.Execute "Drop table [<table name here>];"

If you really want to use DoCmd, try:

DoCmd.SetWarnings False
DoCmd.RunSQL "Drop table [<table name here>];"
DoCmd.SetWarnings True
--
Arvin Meyer, MCP, MVP
Microsoft Access
Free Access downloads:
http://www.datastrat.com
http://www.mvps.org/access
 
Top