Text Property

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.
 
A

Allen Browne

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.
 
J

JIM.H.

Thanks Allen,
If I use value property, what is the easiest way to check
number for digit in the value?
Thanks,
Jim.
 
A

Allen Browne

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.
 
G

Guest

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?
 

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