Input Mask in Microsoft Access, Exercises of Design

How to set rules for non-calculated numbers such as dates and phone numbers in Microsoft Access using input masks. It also provides a list of common characters used to create masks and instructions on how to freeze and unfreeze columns. The document ends with instructions on how to close and delete tables in Access.

Typology: Exercises

2022/2023

Uploaded on 03/14/2023

maya090
maya090 🇺🇸

4.3

(23)

285 documents

1 / 8

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
Lecture five
INPUT MASK
By
Hadeel.M.Saleh
pf3
pf4
pf5
pf8

Partial preview of the text

Download Input Mask in Microsoft Access and more Exercises Design in PDF only on Docsity!

Lecture five

INPUT MASK

By

Hadeel.M.Saleh

INPUT MASK

The input mask sets rules for how non-calculated numbers such as dates and phone numbers are entered in a field. For instance, to display 9/25/1925, you might require users to type it as 09/25/1925. If a value is entered incorrectly, Access rejects it.

To select an input mask for a field  In Design view, click in the Data Type window for the field to which you want to apply the input mask.  In the Field Properties window below, click on Input Mask and then click on the Build button that now appears.  The Input Mask Wizard appears. Scroll through the list of input masks.  Select the appropriate one and click Finish .  The input mask field now displays a series of characters representing how text/numbers are to be entered. The default syntax for entering a phone number, for instance, is :!(999") "000-0000;;_

Syntax Here is a list of common characters used to create masks, borrowed from Microsoft Office Access 2007 Inside Out (pp170-171) :

Character Description 0 Required digit (0 through 9). 9 Optional digit or space.

#

Optional digit or space; blank positions are converted to spaces; plus and minus signs are allowed. L Required letter (A through Z). ? Optional letter (A through Z). A (^) Required letter or digit.

It is not necessary to know what each bit of syntax means, since Access creates masks automatically for you. But it can be useful to understand the syntax behind a mask. For example, one of the date mask defaults is: 99/99/0000;0;_ In this mask the year, represented by 0000 , must be entered using all four digits. If you wanted the year to be configured so that you’d only need to enter the last two digits, you could delete two of the zeroes in the year portion of the mask. The mask would now look like this: 99/99/00;0;_ and a date would change in its appearance from, say, 10/29/1960 to 10/29/60.

To insert a new field name between rows  Position the mouse pointer on the light blue cell (row selector) in front of the row above which you want to add a new field name.  Click with the right mouse button and select Insert Rows (with the left mouse button).  Click inside the Field Name cell for that new row and enter the new field name.

Save the table Before moving ahead, you will be prompted to save your table. Go ahead and do so.

To enter data in your table You will need to return to datasheet view in order to fill in your data.  Click on the Datasheet View icon from the View group under the Design tab.

 Type your data in the table, pressing Enter to move from field to field and then from record to record. ( NOTE: Access automatically adds additional rows as necessary to accommodate your data.)

To freeze a column or columns so that they remain in view as you type across your datasheet

If you have many fields to enter information into, you may wish to freeze your initial column so that you know you’re entering data on the correct row.

NOTE: You are only prompted to resave the table if you made structural or layout changes to it. Additions, deletions, and changes in data entry are saved automatically.

All tables you’ve created so far appear in a list on the left hand side beneath the ribbon in the Database window.

To delete a table  Right mouse click on the table listing and choose Delete .  Click Yes to confirm the deletion.