Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Deleting a table in VB code

Status
Not open for further replies.

bhujanga

Programmer
Oct 18, 2007
181
US
I'm trying to run a Make Table query in VB code. It works fine as long as the table doesn't yet exist, but in reality it will always already exist. Therefore I want to delete it first. thght maybe I could use DeleteObject but it doesn't reWhat is the syntax to use?

Thanks.
 
Sorry, should be:

DoCmd.DeleteObject acTable, "table_name"
 

Constant deleting and making of tables will cause your database size to grow considerably.
You might want to consider a Delete query followed by an Append query.


Randy
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top