M
Mymind
I have a form that contains twenty controls for # of hours, Sum of hours, and
hours_label. (example: A1_Hours, A2_Hours....,A20_Hours and A1_HoursSum,
A2_HoursSum....,A20HoursSum and
A1_Hours_Label,A2_Hours_Label....A20_Hours_Label )
I have created a private sub that loops through a datasource that contains
up to 20 label captions. Based upon the number of captions (x) I would like
to set the associated control properies:
Example:
x=1
Do While Not rs.EOF 'Loop through all records in dataset
'Read in initial AC_CATEGORY_NAME
Act_Cat = rs(1)
'Set field label, and visability parameters
BHE_Ax_HOURS.Visible = True
BHE_Ax_Sum.Visible = True
BHE_Ax_HOURS_Label.Visible = True
BHE_Ax_HOURS_Label.Caption = Acct_cat
'Increment counter and Step to next record
x = x + 1
rs.MoveNext
Loop
How do I dynamically name the control? I tried "BHE_A"&x&"_HOURS" but this
does not work
hours_label. (example: A1_Hours, A2_Hours....,A20_Hours and A1_HoursSum,
A2_HoursSum....,A20HoursSum and
A1_Hours_Label,A2_Hours_Label....A20_Hours_Label )
I have created a private sub that loops through a datasource that contains
up to 20 label captions. Based upon the number of captions (x) I would like
to set the associated control properies:
Example:
x=1
Do While Not rs.EOF 'Loop through all records in dataset
'Read in initial AC_CATEGORY_NAME
Act_Cat = rs(1)
'Set field label, and visability parameters
BHE_Ax_HOURS.Visible = True
BHE_Ax_Sum.Visible = True
BHE_Ax_HOURS_Label.Visible = True
BHE_Ax_HOURS_Label.Caption = Acct_cat
'Increment counter and Step to next record
x = x + 1
rs.MoveNext
Loop
How do I dynamically name the control? I tried "BHE_A"&x&"_HOURS" but this
does not work