Solved

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

Posted on 2013-06-07
2
580 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
ID: 39228584
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
ID: 39228809
Thanks a lot
Excellent code only need to add end if
0

Featured Post

What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

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.
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

863 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

22 Experts available now in Live!

Get 1:1 Help Now