PDA

Click to See Complete Forum and Search --> : Deleting a table from database


jimmykwh
Sep 28th, 2000, 11:34 PM
Hei dude, can u teach me how to delete a particular table from a database by stating the database name in use ans the table name to be delete. then just push the command button to execute the delete statement. so how to write the delete statement??

thanks

Gary.Lowe
Sep 29th, 2000, 02:59 AM
This should do it


Dim dbs As Database

' Modify this line to include the path to your database
Set dbs = OpenDatabase("MyDB.mdb")

' Delete the table.
dbs.Execute "DROP tblMyTable;"

dbs.Close


Hope this helps