By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,481 Members | 3,078 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,481 IT Pros & Developers. It's quick & easy.

Input Mask - Annoying behavior.

P: n/a
I have an unbound textbox that I want to restrict to 10 characters.
I defined the mask as follows CCCCCCCCCC;;" "
The problem is that the behavior of the cursor changed beyond my
request.
Normally, you click on an empty txtbox without the mask and the cursor
goes to the first position.
With a mask this is not the case.

Additionally, if you have a one character txtbox mask set to C;;" " ,
it becomes very easy to inadvertently click on the wrong side of the
entrybox. This results in an annoying beep that convinces the user
that something is wrong and they cannot enter data, when in fact they
are off to the right by one character.

Any way to control this, so the cursor goes to the first postion when
the box is empty?
I do have to restrict the number of characters entered. So I think I
need the mask?
Appreciate tips or suggestions.

Greg

Jan 23 '07 #1
Share this Question
Share on Google+
3 Replies


P: n/a
Baz
Input masks ARE annoying, I never use them.

You could have this as a Validation Rule:

Like "??????????"

<Ap******@gmail.comwrote in message
news:11**********************@51g2000cwl.googlegro ups.com...
I have an unbound textbox that I want to restrict to 10 characters.
I defined the mask as follows CCCCCCCCCC;;" "
The problem is that the behavior of the cursor changed beyond my
request.
Normally, you click on an empty txtbox without the mask and the cursor
goes to the first position.
With a mask this is not the case.

Additionally, if you have a one character txtbox mask set to C;;" " ,
it becomes very easy to inadvertently click on the wrong side of the
entrybox. This results in an annoying beep that convinces the user
that something is wrong and they cannot enter data, when in fact they
are off to the right by one character.

Any way to control this, so the cursor goes to the first postion when
the box is empty?
I do have to restrict the number of characters entered. So I think I
need the mask?
Appreciate tips or suggestions.

Greg

Jan 23 '07 #2

P: n/a
Greg,

I agree with Baz in that input masks can be annoying, but they are sometimes
necessary! The secret to using an input mask is to also have this code in the
OnClick sub for the textbox:

Private Sub YourTextBoxNameGoesHere_Click()
YourTextBoxNameGoesHere.SelStart = 0
End Sub

This insures that when you click on the field the cursor goes to the
beginning and not where the cursor was when you clicked into it.

--
There's ALWAYS more than one way to skin a cat!

Answers/posts based on Access 2000

Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/For...ccess/200701/1

Jan 23 '07 #3

P: n/a
Thanks for the response.
Private Sub YourTextBoxNameGoesHere_Click()
YourTextBoxNameGoesHere.SelStart = 0
End Sub
The suggested code works fine for a bound textbox, but these are
unbound and it does not work!
Maybe I should create a BogusTable for my entry form???
Greg

Jan 23 '07 #4

This discussion thread is closed

Replies have been disabled for this discussion.