G
GeorgeAtkins
In 2007. I have a form with a frame containing option buttons. Along side
each is a textbox containing a date. I want the user to select an option
button and use the value returned to select the adjacent date value.
Frame is named FramePeriod
Dates are named Period1, Period2, Period3, etc.
So, I've tried this:
RptPeriod = Me.FramePeriod
Debug.Print Me.Period & RptPeriod
If I pick the third option button, I would expect the code to select the
third date.
I error out with "Method or data member not found", because VBA tries to
resolve "Me.Period" before performing the concatenation, which would provide
a correct name of Me.Period3, for example.
How can I resolve this, short of giving up on option buttons and going with
selecting the actual date control (which I don't want to happen)? THANKS FOR
ANY HELP!
each is a textbox containing a date. I want the user to select an option
button and use the value returned to select the adjacent date value.
Frame is named FramePeriod
Dates are named Period1, Period2, Period3, etc.
So, I've tried this:
RptPeriod = Me.FramePeriod
Debug.Print Me.Period & RptPeriod
If I pick the third option button, I would expect the code to select the
third date.
I error out with "Method or data member not found", because VBA tries to
resolve "Me.Period" before performing the concatenation, which would provide
a correct name of Me.Period3, for example.
How can I resolve this, short of giving up on option buttons and going with
selecting the actual date control (which I don't want to happen)? THANKS FOR
ANY HELP!