Using variables in Access 2000

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I want to reference text boxes on a subform from the module of the parent
form. To make the control visible I could use the following code:
Me.sfHolder.Form.txtLine1.Visible = True

But, how can I use a variable in place of txtLine1 so I can use a Do/Loop to
reference many of these text boxes, i.e. txtLine1, txtLine2, txtLine3, etc.?
 
Del said:
I want to reference text boxes on a subform from the module of the parent
form. To make the control visible I could use the following code:
Me.sfHolder.Form.txtLine1.Visible = True

But, how can I use a variable in place of txtLine1 so I can use a Do/Loop to
reference many of these text boxes, i.e. txtLine1, txtLine2, txtLine3, etc.?


With Me.sfHolder.Form
For x = 1 To 9
.Controls("txtLine" & x).Visible = True
Next x
End With
 
Back
Top