Hi, if you know the name of control, you can use ControlCollection.Item Property or ControlCollection.Find method to get it.
Do While i <> 30
Me.Controls("statename" & i.ToString()).Text = dataReader(p).ToString()
P = P + 1
i = i + 1
Loop
Or
Do While i <> 30
Me.Controls.Find("statename" & i.ToString(), True)(0).Text = dataReader(p).ToString()
p = p + 1
i = i + 1
Loop
No comments:
Post a Comment