Strings in Variables

  • Thread starter Thread starter Bob Rice
  • Start date Start date
B

Bob Rice

I need to move through the objects of a form, making them visible (or
invisible). The objects are Box1, Box2, etc. I need to loop until they are
all visible.

For k = 1 To 3
Forms![My Form]!Boxk.Visible = True
Next

I can't get the correct syntax for "Boxk".

Need help.

I spend too much time fooling with &'s and single and double quatation
marks. Are there any safe rules of thumb for SQL and the like?
 
I need to move through the objects of a form, making them visible (or
invisible). The objects are Box1, Box2, etc. I need to loop until they are
all visible.

For k = 1 To 3
Forms![My Form]!Boxk.Visible = True
Next

I can't get the correct syntax for "Boxk".
[...]

Forms![My Form].Controls("Box" & k).Visible = True

HTH
Matthias Kläy
 
Back
Top