dim test as string
test="control1"
now, control1 is a textbox
i wanna use the name of the variable i.e. test to get the value of the textbox
i.e. msgbox(test.text)
can any one tell me how to do it?
Douglas J. Steele - 06 Jan 2005 18:19 GMT
MsgBox Me.Controls(test)

Signature
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)
> dim test as string
> test="control1"
[quoted text clipped - 7 lines]
>
> can any one tell me how to do it?
Rick Brandt - 06 Jan 2005 18:19 GMT
> dim test as string
> test="control1"
[quoted text clipped - 7 lines]
>
> can any one tell me how to do it?
MsgBox Me.Controls(test)
You don't want to use the Text property except in special circumstances as
that is the changed (but not yet updated) entry in the control with focus.
The Value property is the default and is what you would normally use.

Signature
I don't check the Email account attached
to this message. Send instead to...
RBrandt at Hunter dot com