Dim ctl as Control
DoCmd.OpenForm "FormName", acDesign, , , , acHidden
For each ctl in Forms!FormName
Select Case acControlType
Case Is = acTextBox:
ctl.Name = "txt" & ctl.Name
Case Is = acComboBox:
ctl.Name = "cbo" & ctl.name
End Select
Next ctl
DoCmd.Close acForm, "FormName", acSaveYes
Problems:
1. If the control was referenced by code anywhere else, that code will no longer work.
2. If any event procedures were written for the original name, those procedures will no longer work.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.