Unbound control field size specification

vX987

Registered User.
Local time
Today, 07:37
Joined
Jun 29, 2007
Messages
51
Hi. I hope this is really easy. I can't seem to find a solution. I have an unbound field used for searching records on a form. I would like to specify the unbound field to allow only 10 number entries..... meaning the person entering data into this unbound field would not be allowed to enter more than 10 numbers, ex 1234567899. I tried putting in 9999999999 in the Input mask of the control, but I did not like how when you clicked into the field, you were able to start typing anywhere in it. If you clicked in the center of it and tried entering in data it would only allow four or so numbers.
My reason for modying what I created is just so the person doing data entry does not always have to make sure the cursor is at the beginning of the textbox and instead have it automatically focused at the beginning no matter where in the text box they click. Any suggestions?
 
I would like to specify the unbound field to allow only 10 number entries..... meaning the person entering data into this unbound field would not be allowed to enter more than 10 numbers, ex 1234567899. I tried putting in 9999999999 in the Input mask of the control, but I did not like how when you clicked into the field, you were able to start typing anywhere in it.
Hi there,

A left-to-right fill for an input mask is given by the "!" character. Add this to the front of your mask code. Also, remember that "9's" are generally used for optional digits, which means your user could get by the validation by not entering all the digits needed (maybe you don't need this, just pointing it out). If the entered data has to be a certain number of digits long, it's best to use "0's", they require entry to pass validation...
 
Look up the SelStart property
 
Thank you ajetrumpet for your suggestion.
I tried putting in the ! in the beginning, but it's still not doing what I'd like it to do.

You know how when you have a bounded text field and when you click in the textbox to enter data, the blinking cursor is focus at the far left of the textbox making it IMpossible for you to move the cursor at all to the center or far right of the textbox UNLESS you format that control center or align the text to the right??
.
.
Well, that is what I want. To have the cursor focus to the far left of the textbox and make it where it'd be IMpossible to click anywhere else in the text box unless there is data or unless you press the space bar

FOR EXAMPLE, when writing a reply back to me, in the Title" textbox, the blinking cursor is focused at the far left and you are not able to focus the cursor anywhere inside the textbox unless you have data or have pressed the space bar.
 
Put the "!" at the end, sorry. That specifies the alignment to left....same with SelStart.
But, again, it does not restrict the movement of the cursor like you want it to. Is this just a perfectionism, or is this really necessary?? If it's not, don't worry about it, the validation you create with the mask will prevent any bad entries.

I know what you mean about the cursor, and I'm not sure. You might try looking up something like "cursor locks" in the VB objects. Might find something there, or even in properties....
 
.
.
Well, that is what I want. To have the cursor focus to the far left of the textbox and make it where it'd be IMpossible to click anywhere else in the text box unless there is data or unless you press the space bar

.

I must be missing something:confused:
 

Users who are viewing this thread

Back
Top Bottom