Microsoft Access Database Development With VBA

DAO Topics: Deleting a Table

   

Description

To delete a table in DAO, pass the name of the undesired table to the Detele() method of the TableDefs property of the database. Here is an example:

Private Sub cmdDeleteTable_Click()
    Dim curDatabase As DAO.Database

    Set curDatabase = CurrentDb

    curDatabase.TableDefs.Delete "Books"
End Sub
   
     
 

Home Copyright © 2013-2015, FunctionX, Inc. Home