Input Mask Exclamation Point

2

2dogs

What does the Exclamation Point character in an Input Mask format string do?

I have read the explanation in the Microsoft documentation that "it causes
the input mask to display from right to left instead of left to right" but
what does that mean? I have tried it many times and can perceive no
difference in the way the mask is displayed. It always appears to be the same.
 
B

Beth Melton

As you noted, the exclamation point changes the direction of fill to
right to left instead of left to right. I think the part you are
missing is this only applies to data you already have in your table
that may have missing area codes.

For example if you have:
5555656
5865551200

Without the exclamation point it would look like:

(555) 565-6
(586) 555-1200

With the exclamation point it would looks like:
( ) 555-5656
(586) 555-1200

Please post all follow-up questions to the newsgroup. Requests for
assistance by email can not be acknowledged.

~~~~~~~~~~~~~~~
Beth Melton
Microsoft Office MVP

Word FAQ: http://mvps.org/word
TechTrax eZine: http://mousetrax.com/techtrax/
MVP FAQ site: http://mvps.org/
 
2

2dogs

Thanks for your response; however, I guess I am dense.
right to left instead of left to right.

I noticed that you mentioned the direction of fill but I did not. I
mentioned the direction of display. According to the Microsoft documentation
the direction of fill is always the same, left to right. Here is their exact
wording: " Causes the input mask to display from right to left, rather than
from left to right. Characters typed into the mask always fill it from left
to right."

missing is this only applies to data you already have in your table
that may have missing area codes.

I'm not sure what this means. I have tried various numbers with and without
area codes and they display the same regardless of the exclamation point. Did
you actually try the examples you showed or are you assuming they are correct
based on something you have read? Can you give me a step by step example that
will demonstrate the difference?

Here is the experience I am having. If I TAB into the cell the input mask
does not display until I enter the first character. When I enter the first
character the input mask then displays from left to right with the first
character in the left most position (filling left to right). Like this:

(4##) ###-####

This behavior is the same regardless of exclamation.

If I CLICK in the cell the mask will immediately display from left to right
and the first character I enter will be in the position where I clicked and
subsequent characters will fill to the right. Again, this behavior is the
same regardless of exclamation.

When I try your example (555) 565-6 I can not enter the number and get the
message "The value you entered is not appropriate for the input mask".

When I enter this example as ( ) 555-5656 I can enter the number. Changing
the exclamation does not affect either of these behaviors.
 
B

Beth Melton

Again, I think the part you are missing is this only applies to data
you *already* have in your table that may have missing area codes. It
has noting to do with data you have yet to enter using the Input Mask.
(And apparently my use of "fill" differs from Microsoft's :) )

Also, yes I'm providing you with information based on very my own
personal experience - I'm not going by something I've read. As a
matter of fact, this is something I figured out years ago when I asked
myself the very same question: "What exactly does the exclamation
point in an Input Mask do???"

Try this:
- Create a new field
- Type following for two records:

5555656
5865551200

- Return to Design view and add the following Input Mask:

\(999") "000\-0000

- Switch back to Datasheet view and note how the mask is displays, the
characters are filling the mask from left to right.
- Return to Design View
- Modify the Input Mask and add an exclamation point at the beginning:

!\(999") "000\-0000

- Switch back to Datasheet view and note how the mask displays, the
characters are filling the mask from right to left.

So if you aren't using an Input Mask for previously entered data then
the exclamation point is irrelevant.

Please post all follow-up questions to the newsgroup. Requests for
assistance by email can not be acknowledged.

~~~~~~~~~~~~~~~
Beth Melton
Microsoft Office MVP

Word FAQ: http://mvps.org/word
TechTrax eZine: http://mousetrax.com/techtrax/
MVP FAQ site: http://mvps.org/
 
2

2dogs

Thank you again Beth.

Using your example I can see how it works now. In the past, I have always
tried it with new data or with data that already had a mask applied but never
tried applying it to existing data in a table that had never had a mask
applied. Gee, it would be nice if Microsoft would include this explanation in
the documentation.
 
2

2dogs

Back again Beth,

Though your example here works as you stated, after further experimentation
I have found that this explanation only holds true for the input mask you
gave for telephone numbers. If I change the mask from \(999") "000\-0000 to
\(999") "999\-9999, making all digits optional, the explanation point will
affect *already* existing data or *new data entered into an input mask*. If I
enter the number 5551234 and use the exclamation point the number displays as
(555) 123- 4 leaving 3 unfilled characters before the 4. If I enter the
same number without the exclamation point it is displayed as (555) 123-4
leaving the unfilled characters after the 4. No doubt other mask formats will
cause different behaviors. I find this to be very unpredictable to the point
of being unusable.
 
B

Beth Melton

Interesting! I've never allowed all of the digits/characters to be
optional, since that's part of the purpose of an Input Mask, so I've
never encountered it "as you are typing". It makes sense, though.

I just tried it and wasn't able to reproduce the blank characters in
the middle - it worked as I would expect. 555-5000 became ( )
555-5000. Maybe you should try the mask again?

Please post all follow-up questions to the newsgroup. Requests for
assistance by email can not be acknowledged.

~~~~~~~~~~~~~~~
Beth Melton
Microsoft Office MVP

Word FAQ: http://mvps.org/word
TechTrax eZine: http://mousetrax.com/techtrax/
MVP FAQ site: http://mvps.org/
 
Top