DoCmd.Rename (Access)
The Rename method carries out the Rename action in Visual Basic.
You can use the Rename method to rename a specified database object. If you leave the ObjectType and OldName arguments blank (the default constant, acDefault, is assumed for ObjectType), Access renames the object selected in the Database window. To select an object in the Database window, you can use the SelectObject method with the InDatabaseWindow argument set to Yes (True).
Rename (NewName, ObjectType, OldName)
DoCmd.Rename "Old Employees Table", acTable, "Employees"
Arguments
The following argument is required
NewName (String) - A string expression that's the new name for the object that you want to rename. The name must follow the object-naming rules for Microsoft Access objects.
Optional arguments
The following arguments are optional
ObjectType (AcObjectType) - An AcObjectType constant that specifies the type of object to rename. The default value is acDefault.
Here you can find possible values for
OldName (String) - A string expression that's the valid name of an object of the type specified by the ObjectType argument. If you execute Visual Basic code containing the Rename method in a library database, Access looks for the object with this name first in the library database, and then in the current database.