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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Selecting and deleting multiple database objects

Status
Not open for further replies.

sayetta

Programmer
Oct 23, 2000
4
US
Would love to hear from anyone who knows how to delete multiple objects (for example, tables) from the database window. I've got over 100 table links and sometimes need to delete all or most of them.

Thanks!
 
Hi, sayetta!

See at thread705-101285
I hope there you'll find answers to your question.

Aivars
LOL My summer holidays will start next week! Hurrah!
 
Well sayetta,

try this code in a backup of your database.

***This deletes all of your tables in your project***


Do While DCount("[Name]", "MSysObjects", "[Type]=1 And [Name] NOT Like ""MSYS*""") > 0
DoCmd.DeleteObject acTable, DFirst("[Name]", "MSysObjects", "[Type]=1 And [Name] NOT Like ""MSYS*""")
Loop


or see at faq181-690 for selecting other objects

In case of tables,if you need to delete some relationships before see also at faq181-837

Good Luck


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top