input mask

G

Guest

How can I write an input mask, if at least 2 and at most 4 characters have to
be written and these are followed by exactly 6 digits? I found a mask but I
cannot exclude spaces if I enter 2 or 3 characters!
 
S

StCyrM

Good morning

The follwoing discussion on masks may be useful.

Best Regards

Maurice St-Cyr
Micro Systems Consultants, Inc.
----------------------------------------------
Character Description

0 Digit (0 through 9, entry required; plus [+] and minus [-] signs not
allowed).
9 Digit or space (entry not required; plus and minus signs not allowed).
# Digit or space (entry not required; blank positions converted to spaces, plus
and minus signs allowed).
L Letter (A through Z, entry required).
? Letter (A through Z, entry optional).
A Letter or digit (entry required).
a Letter or digit (entry optional).
& Any character or a space (entry required).
C Any character or a space (entry optional).
.. , : ; - / Decimal placeholder and thousands, date, and time
separators. (The actual character used depends on the regional settings
specified by double-clicking Regional Settings in the Windows Control
Panel.)

< Causes all characters that follow to be converted to lowercase.
Causes all characters that follow to be converted to uppercase.
! 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. You can include the exclamation point anywhere in the input mask.

\ Causes the character that follows to be displayed as a literal
character. Used to display any of the characters listed in this table as
literal characters (for example, \A is displayed as just A).

Password Setting the InputMask property to the word Password creates a
password entry text box. Any character typed in the text box is stored as
the character but is displayed as an asterisk (*).
 
G

Guest

First of all thank you for answering my question. Yes I know all of these,
but what I want to learn is when I want to add 2 letters then 6 digits, I
have to leave 2 spaces before entering the digits, and I don't want these
spaces to be appeared on the screen. What should be my input mask? my
inputmask is LL??000000

"StCyrM":
Good morning

The follwoing discussion on masks may be useful.

Best Regards

Maurice St-Cyr
Micro Systems Consultants, Inc.
----------------------------------------------
Character Description

0 Digit (0 through 9, entry required; plus [+] and minus [-] signs not
allowed).
9 Digit or space (entry not required; plus and minus signs not allowed).
# Digit or space (entry not required; blank positions converted to spaces, plus
and minus signs allowed).
L Letter (A through Z, entry required).
? Letter (A through Z, entry optional).
A Letter or digit (entry required).
a Letter or digit (entry optional).
& Any character or a space (entry required).
C Any character or a space (entry optional).
.. , : ; - / Decimal placeholder and thousands, date, and time
separators. (The actual character used depends on the regional settings
specified by double-clicking Regional Settings in the Windows Control
Panel.)

< Causes all characters that follow to be converted to lowercase.
Causes all characters that follow to be converted to uppercase.
! 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. You can include the exclamation point anywhere in the input mask.

\ Causes the character that follows to be displayed as a literal
character. Used to display any of the characters listed in this table as
literal characters (for example, \A is displayed as just A).

Password Setting the InputMask property to the word Password creates a
password entry text box. Any character typed in the text box is stored as
the character but is displayed as an asterisk (*).


How can I write an input mask, if at least 2 and at most 4 characters have to

be written and these are followed by exactly 6 digits? I found a mask but I
cannot exclude spaces if I enter 2 or 3 characters!
 
J

John Nurick

Hi Sezgin,

IMHO input masks are more trouble than they're worth. For this situation
I'd set a validation rule on the field, something like this mouthful:

(Like "[A-Z][A-Z][A-Z][A-Z]######") Or (Like "[A-Z][A-Z][A-Z]######") Or
(Like "[A-Z][A-Z]######")

If necessary, change all the "[A-Z]" to include whatever characters are
legitimate, e.g. "[A-Za-zÄÖÜäöüß]".
 
G

Guest

Dear John Nurick, thanks for your help...

"John Nurick":
Hi Sezgin,

IMHO input masks are more trouble than they're worth. For this situation
I'd set a validation rule on the field, something like this mouthful:

(Like "[A-Z][A-Z][A-Z][A-Z]######") Or (Like "[A-Z][A-Z][A-Z]######") Or
(Like "[A-Z][A-Z]######")

If necessary, change all the "[A-Z]" to include whatever characters are
legitimate, e.g. "[A-Za-zÄÖÜäöüß]".

How can I write an input mask, if at least 2 and at most 4 characters have to
be written and these are followed by exactly 6 digits? I found a mask but I
cannot exclude spaces if I enter 2 or 3 characters!
 

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

Similar Threads

Data input 2
Remove input mask format 4
input mask !!!! 3
Input Mask 1
Input Mask 1
Input Mask Help 1
changing the Phone Number Input Mask to all for extensions 2
Input Mask Wizard CUSTOMIZE symbols 1

Top