I would like to change the field name of a table using code.
So far this is what I have but I am stuck.
function Change_field_name()
DoCmd.Opentable "myTable", acNormal, acEdit
DoCmd.GoToControl "TimeVisit"
DoCmd.RunCommand acCmdRenameColumn
End Function
I tried adding acCmdRenameColumn ("TimeVisit","ImpDate"
but it did not work. Any help would be greatly appreciated thanksss everyone.
So far this is what I have but I am stuck.
function Change_field_name()
DoCmd.Opentable "myTable", acNormal, acEdit
DoCmd.GoToControl "TimeVisit"
DoCmd.RunCommand acCmdRenameColumn
End Function
I tried adding acCmdRenameColumn ("TimeVisit","ImpDate"
but it did not work. Any help would be greatly appreciated thanksss everyone.