473,508 Members | 2,509 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Input Mask - Annoying behavior.

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
3 3493
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
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
1372
by: Gregory Lielens | last post by:
Hello all, I am not sure this is the correct list to ask as my problem is really related to python low level implementation, but as I do not have found a python.dev list, here it is :-) We...
4
3011
by: David W. Fenton | last post by:
I'm working on a subform where users put in 24-hour time. On their paper forms, they've been accustomed to referring to midnight as 24:00 (instead of as 0:00, which kind of makes sense from a human...
2
3697
by: johnp | last post by:
Hi, Our Tech department updated users to Office 2003 this week. Now the input mask in one of the applications is showing up as: (###) ###-### The input mask wizard works correctly when I...
7
7015
by: F. Michael Miller | last post by:
I have a db with Access front end, sql back, linked tables. I need to be able to change input masks at the table level in code. Any ideas? Thanks!
1
1418
by: AA Arens | last post by:
(1) When I want the data in the datafield starts with the first character forcedly uppercased, I use the input mask >L<, followed by ?????. When entering the data, the field is marked with...
3
3309
by: AA Arens | last post by:
When I want the first character of a field to be Uppercased, I need to make an input mask, like >L< followed by ??????? for example. But this mask creates ____ in an unfilled field, which I don't...
16
12664
by: Filips Benoit | last post by:
Dear all, I have a datefield that sometimes should store hours and minutes too ans use following format and inputmask. dd/mm/yyyy hh\:nn 09/09/0000\ 99:99;0;* Typing date, hour and...
2
7526
by: ILCSP | last post by:
Hello, I have this Access 2K query that I need to re-create in MS SQL Server 2000, so I'm using the Query Analyzer to test it. One of the Access fields stores the home phone number. In the...
7
3481
desklamp
by: desklamp | last post by:
I'm a total Access newbie, please bear with me! Using Win2K/Access 2003. I'm trying to create a table in which I can store IP addresses and other information. According to Microsoft, there is no...
0
7133
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7336
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7405
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
7066
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
5643
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
4724
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3198
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1568
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
773
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.