MSAccess: Rename imported tables
#VisualBasic
#MSAccess
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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