Text Property

  • Thread starter Thread starter JIM.H.
  • Start date Start date
J

JIM.H.

Hello,
Text0 is a text box in the form and I am using Forms!
FormName!Text0.Value=myNewString format to display
myNewString in the form, can I use Forms!FormName!
Text0.Text=myNewString or is there any other way to do
this without using Value property?
Thanks,
Jim.
 
Unlike pure VB where the Text property is default, you use the Value
property in Access.

Since Value is the default property, you can use:
Forms!FormName!Text0 = myNewString

The Text property in Access only refers to the text in a control while it is
being edited, and before the BeforeUpdate event fires to validate the
contents.
 
Thanks Allen,
If I use value property, what is the easiest way to check
number for digit in the value?
Thanks,
Jim.
 
Not sure I understand the question, Jim.

If you are wanting to prevent the user from entering a non-numeric value,
just set the Format property of the text box to:
General Number

If you want to find a digit in a string, use Instr() to locate it.
 
Sorry I meant number of characters in the string.
value property returns a string and I need to find out
how many charcters is in it?
 
Back
Top