Select a field on a form, based on variable
I have a form, that has quite a few diffent text fields on it. They are all named very similar, (like txtC1, txtC2, txtM1, txtM2, etc)
What I'm wanting to do, is be able to select a certain field on this form, based on a field name that I am stringing together from criteria that is being built.
So, instead of doing the following...
Me.txtC1.SetFocus
I would like to substitute that for some like
Me.strField.SetFocus
where strField is being defined in a previous line of code.
My question is, how do I go about selecting that field like that?
John
|