This is something that's bugged me. I frequently use a text or combo box in a form in code, so I want to assign that value to a variable.
The only way I can seem to do it is to do something like this:
Dim HoldText as string
MyText.SetFocus
HoldText=MyText.text
The problem is, sometimes I don't want to set the focus to the box. Is there a way to get the value in Access '97?
I've tried
HoldText=Forms!MyForm.Mytext.text, but it tells me I can't do this unless the control has the focus.
Is there another way?
The only way I can seem to do it is to do something like this:
Dim HoldText as string
MyText.SetFocus
HoldText=MyText.text
The problem is, sometimes I don't want to set the focus to the box. Is there a way to get the value in Access '97?
I've tried
HoldText=Forms!MyForm.Mytext.text, but it tells me I can't do this unless the control has the focus.
Is there another way?