Solved

how can i delete in access 2013 with vba every table that starts with Backup_"

Posted on 2013-06-07
2
567 Views
Last Modified: 2013-06-07
hi

I am looking for a way to delete with vba any table that begins with "Backup_",

thanks
0
Comment
Question by:bill201
2 Comments
 
LVL 77

Accepted Solution

by:
peter57r earned 500 total points
Comment Utility
Backup before testing!!!!!!!!!!

Sub deltab()
Dim tdf As DAO.TableDef
For Each tdf In CurrentDb.TableDefs
If Left(tdf.Name, 7) = "backup_" Then
DoCmd.DeleteObject acTable, tdf.Name
Next tdf

End Sub
0
 

Author Closing Comment

by:bill201
Comment Utility
Thanks a lot
Excellent code only need to add end if
0

Featured Post

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

APEX (Application Express) is used to develop a web application from Oracle. SQL Workshop is one of the tools that comes with Oracle APEX to query or modify the database objects or to make any changes to the structure.
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
In Microsoft Access, learn different ways of passing a string value within a string argument. Also learn what a “Type Mis-match” error is about.
With Microsoft Access, learn how to specify relationships between tables and set various options on the relationship. Add the tables: Create the relationship: Decide if you’re going to set referential integrity: Decide if you want cascade upda…

763 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now