Skip to content

Instantly share code, notes, and snippets.

@janikvonrotz
Created June 10, 2013 14:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save janikvonrotz/5749322 to your computer and use it in GitHub Desktop.
Save janikvonrotz/5749322 to your computer and use it in GitHub Desktop.
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