Top Banner
Introduction to Database using Microsoft Access 2013 Part 6.1 November 18, 2014
40

Introduction to Database using Microsoft Access 2013 Part 6.1 November 18, 2014.

Jan 05, 2016

Download

Documents

Leslie Blake
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Introduction to Database using Microsoft Access 2013 Part 6.1 November 18, 2014.

Introduction to Database using Microsoft Access

2013Part 6.1

November 18, 2014

Page 2: Introduction to Database using Microsoft Access 2013 Part 6.1 November 18, 2014.

Adding Input Mask

Page 3: Introduction to Database using Microsoft Access 2013 Part 6.1 November 18, 2014.

Input Mask

Microsoft Access interprets characters in the InputMask property definition as shown in the following table. To define a literal character, enter any character other than those shown in the table, including spaces and symbols. To define one of the following characters as a literal character, precede that character with a backslash (\).

Page 4: Introduction to Database using Microsoft Access 2013 Part 6.1 November 18, 2014.

Input masks provide a set format for data entry in a field by using characters and symbols. When you apply an input mask to a field, anyone who inputs data in that field must follow the specific pattern defined by the input mask. For example, if the database user enters a phone number without the area code, in this particular mask, (___) 555-0187 xt. ___ the user will be unable to save the data until the area code data is added. The exact behavior depends on the how the database designer sets up the input mask.

Input masks provide a large amount of data validation and prevent users from entering invalid data (such as a phone number in a date field). Input masks can also help ensure that users enter data in a consistent way. That consistency can make data easier to find and make it easier to maintain your database.

Page 5: Introduction to Database using Microsoft Access 2013 Part 6.1 November 18, 2014.

Remember that you define input masks to control the format in which data is entered in the database but you can apply another format to the same data to change how the data is displayed. For example, your input mask can define dates to be entered in a format such as YYYY.MM.DD, but have the date appear as DD-MMM-YYYY.

Page 6: Introduction to Database using Microsoft Access 2013 Part 6.1 November 18, 2014.

Three Parts of an Input Mask

Page 7: Introduction to Database using Microsoft Access 2013 Part 6.1 November 18, 2014.

The first part is mandatory. It includes the mask characters or string (series of characters) along with placeholders and literal data such as, parentheses, periods, and hyphens.

The second part is optional and refers to the embedded mask characters and how they are stored within the field. If the second part is set to 0, the characters are stored with the data, and if it is set to 1, the characters are only displayed and not stored. Setting the second part to 1 can save database storage space.

The third part of the input mask is also optional and indicates a single character or space that is used as a placeholder. By default, Access uses the underscore (_). If you want to use another character, enter it in the third part of your mask.

Page 8: Introduction to Database using Microsoft Access 2013 Part 6.1 November 18, 2014.

Examples

For example, this is an input mask for a telephone numbers in the U.S. format: (999) 000-000;0;-:

The mask uses two placeholder characters, 9 and 0. The 9 indicates an optional digit (which makes it optional to enter an area code), and each 0 indicates a mandatory digit.

The 0 in the second part of the input mask indicates that the mask characters will be stored along with the data.

The third part of the input mask specifies that a hyphen (-) instead of the underscore (_) is to be used as the placeholder character.

Page 9: Introduction to Database using Microsoft Access 2013 Part 6.1 November 18, 2014.

Creating an Input Mask

Page 10: Introduction to Database using Microsoft Access 2013 Part 6.1 November 18, 2014.

Begin

Click MS Access 2013

On the MS Access Screen Pane, select Blank Database

Create a name that will reserve as your file for the database

Page 11: Introduction to Database using Microsoft Access 2013 Part 6.1 November 18, 2014.

In the screen pane, click blank desktop database

Page 12: Introduction to Database using Microsoft Access 2013 Part 6.1 November 18, 2014.

In the screen box, click the browse button to save in any file that you want

Write your name in the box that you want to save your database

Click create if done

Page 13: Introduction to Database using Microsoft Access 2013 Part 6.1 November 18, 2014.

In the MS Access Environment

Right Click the “Table 1”.

Page 14: Introduction to Database using Microsoft Access 2013 Part 6.1 November 18, 2014.

Click Design View

Page 15: Introduction to Database using Microsoft Access 2013 Part 6.1 November 18, 2014.

Save first.

Write your name inside the Table Name Box

Click “OK” if done.

Page 16: Introduction to Database using Microsoft Access 2013 Part 6.1 November 18, 2014.

You are now in the Design View.

Page 17: Introduction to Database using Microsoft Access 2013 Part 6.1 November 18, 2014.

How to add fields in the design view

Write first your Field Name.

Page 18: Introduction to Database using Microsoft Access 2013 Part 6.1 November 18, 2014.

Second, select from the data type that you want.

Page 19: Introduction to Database using Microsoft Access 2013 Part 6.1 November 18, 2014.

Third, is to write a short description based on your field name.

Page 20: Introduction to Database using Microsoft Access 2013 Part 6.1 November 18, 2014.

If you're done. Click the General Properties (Field) to emphasize your field.

Page 21: Introduction to Database using Microsoft Access 2013 Part 6.1 November 18, 2014.

Now you're sample will be like this. With the Field Properties.

Page 22: Introduction to Database using Microsoft Access 2013 Part 6.1 November 18, 2014.

Input Mask: Creating

Page 23: Introduction to Database using Microsoft Access 2013 Part 6.1 November 18, 2014.

Creating an Input Mask

First, click the Input Mask Tab or Button and write any expression that you do.

Page 24: Introduction to Database using Microsoft Access 2013 Part 6.1 November 18, 2014.

After you’re done, your input mask will be like this.

Page 25: Introduction to Database using Microsoft Access 2013 Part 6.1 November 18, 2014.

Right Click Table1.

Click Datasheet View.

Don’t forget to save your design view

Putting it in the Datasheet View

Page 26: Introduction to Database using Microsoft Access 2013 Part 6.1 November 18, 2014.

You are now in the datasheet view

The blanks in that field will be like _____________

Page 27: Introduction to Database using Microsoft Access 2013 Part 6.1 November 18, 2014.

Entering a Value

When you enter see to it, it’s appropriate for that field

Page 28: Introduction to Database using Microsoft Access 2013 Part 6.1 November 18, 2014.

Creating an Input Mask in a Different Way

Page 29: Introduction to Database using Microsoft Access 2013 Part 6.1 November 18, 2014.

Repeat Slides 10-21.

Page 30: Introduction to Database using Microsoft Access 2013 Part 6.1 November 18, 2014.

In the Input Mask you see a button with a …. Click the button and you will see the properties.

Page 31: Introduction to Database using Microsoft Access 2013 Part 6.1 November 18, 2014.

There an Input Mask wizard.

Now you can select any of the input mask in the table.

Click Next if done.

Page 32: Introduction to Database using Microsoft Access 2013 Part 6.1 November 18, 2014.

There you can write anything that you want.

Click NEXT if done.

Page 33: Introduction to Database using Microsoft Access 2013 Part 6.1 November 18, 2014.

How do you want to store the data? With symbols or without.

Click NEXT if done

Page 34: Introduction to Database using Microsoft Access 2013 Part 6.1 November 18, 2014.

A message has been encountered.

And click Finish.

Page 35: Introduction to Database using Microsoft Access 2013 Part 6.1 November 18, 2014.

Now you’re input mask has been updated.

Page 36: Introduction to Database using Microsoft Access 2013 Part 6.1 November 18, 2014.

Repeat Slides 25-27.

Page 37: Introduction to Database using Microsoft Access 2013 Part 6.1 November 18, 2014.

Input Mask Syntaxes

Character Description

0Digit (0 through 9, entry required; plus [+] and minus [-] signs not allowed).

9Digit 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).

Page 38: Introduction to Database using Microsoft Access 2013 Part 6.1 November 18, 2014.

Character Description

. , : ; - /

Decimal placeholder and thousands, date, and time separators. (The actual character used depends on the regional settings specified in Microsoft 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.

Page 39: Introduction to Database using Microsoft Access 2013 Part 6.1 November 18, 2014.

Character Description

\

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 (*).

Page 40: Introduction to Database using Microsoft Access 2013 Part 6.1 November 18, 2014.

Input Mask Example

Input Mask Definition Examples of Values

(000) 000-0000 (206) 555-0248

(999) 999-9999! (206) 555-0248 ( ) 555-0248

(000) AAA-AAAA (206) 555-TELE

#999 -20 2000

>L????L?000L0 GREENGR339M3 MAY R 452B7

>L0L 0L0 T2F 8M4

00000-9999 98115- 98115-3007

>L<?????????????? Maria Pierre

ISBN 0-&&&&&&&&&-0 ISBN 1-55615-507-7 ISBN 0-13-964262-5

>LL00000-0000 DB51392-0493