Advertisement
g96

Untitled

g96
Feb 10th, 2022
304
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Option Compare Database
  2. Option Explicit
  3.  
  4. Public Sub del_all_tables()
  5.    Dim db As DAO.Database
  6.    Dim tdf As DAO.TableDef
  7.    Set db = CurrentDb
  8.  
  9.    For Each tdf In db.TableDefs
  10.        If Not (tdf.Name Like "PB*") Then
  11.            DoCmd.DeleteObject acTable, tdf.Name
  12.        End If
  13.    Next
  14. End Sub
  15.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement