Skip to content

Instantly share code, notes, and snippets.

Created June 10, 2013 14:50
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
What would you like to do?
MSAccess: Rename imported tables #VisualBasic #MSAccess
Public Function TabellenUmbenennen()
' Diese Funktion benennt alle Tabelle um und
' schneidet den vorgestellten Text "dbo_" ab.
Dim tdfLoop
Dim NewName As String
For Each tdfLoop In CurrentDb().TableDefs
If Left(tdfLoop.Name, 4) = "dbo_" Then
NewName = Mid(tdfLoop.Name, 5, 50)
DoCmd.Rename NewName, acTable, tdfLoop.Name
TabellenUmbenennen = TabellenUmbenennen + 1
End If
Next tdfLoop
End Function
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment