I've been unsuccessful in finding if this is a possibility. I'd like to make a button that adds a textbox to a form when you click it in form view. I had to make 39 text boxes and each also required a label and two buttons...the renaming process was quite time consuming so I was wondering if (for in the future) there is a way to code it in to automatically generate a new box when the user hits a button. I know I can access the textboxes with strings and do loops:
loop to hide all of them:
Code:
Do While i < 40
strL = "L" & i
strS = "S" & i
strC = "CS" & i
strA = "A" & i
Me(strL).Visible = False
Me(strS).Visible = False
Me(strC).Visible = False
Me(strA).Visible = False
i = i + 1
Loop
edit: Now that I think of it, if there is a way to preserve the naming format when you copy/paste a control that'd work too if that is a possibility.