text box

  • Thread starter Thread starter martin placek
  • Start date Start date
M

martin placek

Merry xmas

I have a variable that i want to equate to the contents of
a text box. What is the property for this?

Martin
 
martin placek said:
Merry xmas

I have a variable that i want to equate to the contents of
a text box. What is the property for this?

Martin

Except in unusual circumstances you would use the Value property, which
is the default property of a text box. So you could have code similar
to:

Dim varMyVariable As Variant

varMyVariable = Me!txtMyTextBox

That's assuming the code is in the module of the form that contains the
text box, so that "Me" can be used to refer to it.
 
Back
Top