text box

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
 
D

Dirk Goldgar

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top