davman2002
Programmer
I need to know how to set the value of a reports label and text box through VBA. I am using the on_load event procedure and my current non-working code is:
While intMonth <= 12
lblValue = "Me.lblMth" & intMonth
txtValue = "Me.txtMth" & intMonth
lblValue.Caption = Left(strMonth, 3)
txtValue.Text = strMonth & "-" & strYear
intMonth = intMonth + 1
Wend
While intMonth <= 12
lblValue = "Me.lblMth" & intMonth
txtValue = "Me.txtMth" & intMonth
lblValue.Caption = Left(strMonth, 3)
txtValue.Text = strMonth & "-" & strYear
intMonth = intMonth + 1
Wend