Argument | Description |
newname | A string expression that's the new name for the object you want to rename. The name must follow the object-naming rules for Microsoft Access objects. |
objecttype | One of the following intrinsic constants: |
acDefault (default) acForm acMacro acModule acQuery acReport acTable | |
oldname | 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, Microsoft Access looks for the object with this name first in the library database, then in the current database. |
DoCmd.Rename "Old Employees Table", acTable, "Employees"