473,763 Members | 1,356 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 3511
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.goog legroups.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 YourTextBoxName GoesHere_Click( )
YourTextBoxName GoesHere.SelSta rt = 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.c om
http://www.accessmonster.com/Uwe/For...ccess/200701/1

Jan 23 '07 #3
Thanks for the response.
Private Sub YourTextBoxName GoesHere_Click( )
YourTextBoxName GoesHere.SelSta rt = 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
1383
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 are curently developing python bindings to make a MPI parallel application (Finite element solver) script driven. I have written a main interpreter, able to execute scripts or interractive commands,in // , based on the following techniques:
4
3052
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 point of view, though it's still wrong, as it puts midnight as the end of the previous day instead of the beginning of the next, but it avoids the zero time problem). I have an input mask to put the : in the time, but when you input 24:00, it...
2
3723
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 redo the mask. But in form view, the mask appears reverts to the previous.
7
7068
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
1439
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 underscores (____), But I do not want to see them. (2) When I click on an emtpy field with a mouse, the cursor stays not in the first position.
3
3333
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 like. How to get the fist character uppercased without an input mask or without ____ (underscores). When I click with the mouse on an empty field, it won't go to the far left side, cause of the input mask. How to avoid it? Bart
16
12695
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 minutes is OK.
2
7541
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 Access query, if the phone number is null, it fills it up with zeroes "000000000." If the phone has an input mask, it only gets the 9 numbers (area code included) and if the phone number's good (all numbers) then it leaves it alone. That Access query...
7
3525
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 native way of converting an IP address to an integer/long number (which is much more efficient to index and search). After searching, I found a function which is able to take either an IP address or integer and convert it to the other. In the...
0
9386
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10145
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9998
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9938
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9822
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8822
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7366
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6642
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
3917
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 we have to send another system

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.