I am attempting to populate some text boxes in VBA by using a common beginning for the name, and the month (such as Oct) in a variable.
I have hard coded "Oct" into the code which works:
Me.txtAMER_Oct = rst.Fields("cnt")
I'm not sure how to incorporate the variable mth, tried unsucessfully:
Me.'txtAMER_' & mth = rst.Fields("cnt")
Me.txtAMER_ & mth = rst.Fields("cnt")
"Me.txtAMER_" & mth = rst.Fields("cnt")
etc, etc....
Any help will be appreciated.
Randy
I have hard coded "Oct" into the code which works:
Me.txtAMER_Oct = rst.Fields("cnt")
I'm not sure how to incorporate the variable mth, tried unsucessfully:
Me.'txtAMER_' & mth = rst.Fields("cnt")
Me.txtAMER_ & mth = rst.Fields("cnt")
"Me.txtAMER_" & mth = rst.Fields("cnt")
etc, etc....
Any help will be appreciated.
Randy