loop for labels invisible/not invisible

Super Suarez

Registered User.
Local time
Yesterday, 21:27
Joined
Jul 10, 2013
Messages
36
Hi, I'm trying to get some labels and eventually text boxes to become visible on an input of a qty in a text box, but I can't get my syntax right. Hope someone can help. The labels are numbered pumplbl1, pumplbl2 etc

Here's what I have so far.

Private Sub More_qty_AfterUpdate()
Dim count As Integer
Dim pumplbl As String
For count = 1 To [More qty].Value
pumplbl = "pumplbl" & count
pumplbl.Visible = True

Next count

End Sub
 
I suspect you have this need due to inappropriate data structure. The repeating names are the clue.

These values should be held as separate records in a related table and displayed in forms using a subform.
 
I'm not sure I follow. I have a sub form with a textbox, and if I say type 5 into that textbox, how do I get a further 5 textboxes/labels to appear?
 
Let me rephrase Galaxiom's reply.. Why do you want 5 TextBoxes to appear when you type 5?

Explain in simple terms/plain words what exactly you are looking for.. Just don't say I want 5 boxes..

PS: Let's rule out that, what you "want" is not "needed" here.. So explain Why..
 

Users who are viewing this thread

Back
Top Bottom