Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Textbox input reverts back to length of prior .value

Status
Not open for further replies.

dbMark

Programmer
Apr 10, 2003
1,515
US
I'm modifying another's code. Two option buttons change the lengths for input in a separate textbox. One Opt changes maxlength to 9, width to 9, inputmask to "999999999", .value to "". It all works okay, for example "Length==9". Then the other Opt changes maxlength to 5, width to 5, inputmask to "99999", value to "". When data is input (such as "55555") the .value becomes "55555h==9". So strange since the .value had been set to an empty string.

That puzzled me for a long time but I've noticed that .Text appears accurate. This is new for me, does this mean that I must use .Text when dealing with a TextBox, rather than .Value?
 
Well, I wrote too soon. The .Text property appears to be readonly. I'll try writing to .Value and reading from .Text to avoid the overlap of different data in .Value. The help section does say there are an assortment of variations using .Text and .Value with other property settings. I don't need to rework the whole thing, just fix this last issue.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top