Input mask works not reliable

L

Luca Brasi

We got an Access db containing contact data including some phone number
fields (mobile, direct, fax,...). All these fields have following input mask:
!\(999") "000\-0000;0;_

This mask looks ok to me and works for most people, but for a few users it
don't. If they try to enter a number they cannot enter the last 3 figures.
Example:
They want to enter "(123) 456-7890" but can only input "(123) 456-7".

If they edit a field that already contains a correct phone number (entered
by someone else) and press Enter without having made any changes, Access pops
up the message that the input does not fit the input mask.

I observed that replacing the "-" (minus sign) in the input mask with just a
space makes the problem disappear. But that's not the phone number format
they require for the db fields...

I cannot reproduce this issue if I do a login on their machines. Neither do
they if they log into a new machine (where a new empty user profile is
created). So the problem seems to be connected to the settings of these local
profiles. I don't want to delete

I guessed that the regional and language settings of the users affected
could cause the problem but I could not make out any differences to my own
profile settings (but maybe I overlooked something?).

Anyone knows such problems? How can the minus sign mess up the input mask?
What could be special about the user profiles affected?

Many thanks for any hints.
Luca
 
L

Linq Adams via AccessMonster.com

I don't really think it's the minus sign. I think it may be

1) How they are accessing the textbox (some clicking on it, some tabbing
into it) especially when they're editing a field

2) How fast they are at data entry (clicking in the middle of the Input Mask
and start typing without realizing they didn't start at the beginning)

3) And maybe how Access is set up on the individual machines.

When using Input Masks, be sure in use code like this to assure that if
the user clicks on the textbox the cursor will go to the beginning of the
field.
Otherwise the insert point will be wherever they clicked in, and they'll
waste time redoing it or they'll get the message you've reported, that it
doesn't meet the required formatting!

Private Sub YourTextBoxName_Click()
Me.YourTextBoxName.SelStart = 0
End Sub

If your Access default (set in Tools - Options - Keyboard) for Entering a
Field is set to anything other than "Go to start of field," also use this

Private Sub YourTextBoxName_GotFocus()
Me.YourTextBoxName.SelStart = 0
End Sub

Also use this second if you're going to be distributing your database to
multiple machines. That way the users can have the Entering a Field behavior
set to their own preference for other DBs.
 

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