Customize input masks


Input mask.

 

An input mask is the format we will assign for the introduction of values into a field. We can either generate masks in an automatic manner using the corresponding wizard, or we can define our own input masks.

The Input mask property can have up to 3 sections, separated by semicolons (;).

Section

Descriptión

First

Especifies the input mask itself, e.g, !(999) 999-9999. To see a list of the characters used to define an input mask, check the table below.

Second

Especifies whether Access2003 stores the literal display characters in the table on introducing data. If you use 0 for this section all the literal display characters (e.g, the parenthesis of an input mask of a telephone number) are stored with the value, if you introduce 1 or leave this section blank, only characters introduced in the control will be stored.

Third

Especify the character that Access2003 shows where the user should type a character in the input mask. For this section any character can be used, to show an empty string use a space enclosed in quotation marks (" ").

 

 

When creating an input mask, you can use special characters so that the introduction of specific data (e.g, the area code of a telephone number) is obligatory and that the rest of the data is optional (like the telephone extension). These characters specify the type of data, like the number or letter that needs to be introduced for each character of the input mask.

You can define an input mask using the following characters:

Character

Definition

0

Digit (0 to 9, input obligatory, plus [+] and minus [-] signs not permitted).

9

Digit or space (input not obligatory, plus or minus signs not permitted).

#

Digit or space (input not obligatory, spaces are showed as blanks while in Edit mode, but are eliminated when the data is saved, plus and minus signs are permitted).

L

Letter (A to Z, input obligatory).

?

Letter (A to Z, input optional).

A

Letter or digit (input obligatory).

a

Letter or digit (input optional).

&

Any character or a space (input obligatory).

C

Any character or a space (input optional).

. , : ; - /

Decimal position marker and thousands, time, and date separators.

<

Converts all the characters to lowercase.

>

Converts all the characters to uppercase.

!

Causes the input mask to display from right to left rather then from left to right.The characters introduced always fill the mask from left to right. An exclamation point can be included anywhere in the input mask.

\

Causes the character that follow to be displayed as a literal character rather than a input mask symbol. e.g, (\A will just be shown as A)

 



 
Legal warning: Authorised on-line use only. It is not allowed the use of these courses in companies or private teaching centres.
© aulaClic. All rights reserved. Reproduction in any form whatsoever is prohibited. April-2006.