R
rmcompute
I am trying to use the contents of a variable as a field name. I set up some
test code as listed below to try to display the contents of field
cboRptPeriod. The first MsgBox displays the contents of that field, however,
the second Msgbox displays the text Me.cboRptPeriod instead of the contents
of the field. Is there a way to do this with a variable?
Private rmtest()
rmtest1 "cboRptPeriod"
End Sub
Sub rmtest1(strFieldTest)
MsgBox Me.cboRptPeriod
MsgBox "Me." & strFieldTest
End Sub
test code as listed below to try to display the contents of field
cboRptPeriod. The first MsgBox displays the contents of that field, however,
the second Msgbox displays the text Me.cboRptPeriod instead of the contents
of the field. Is there a way to do this with a variable?
Private rmtest()
rmtest1 "cboRptPeriod"
End Sub
Sub rmtest1(strFieldTest)
MsgBox Me.cboRptPeriod
MsgBox "Me." & strFieldTest
End Sub