Presentation is loading. Please wait.

Presentation is loading. Please wait.

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

Similar presentations


Presentation on theme: "Introduction to Database using Microsoft Access 2013 Part 6.1 November 18, 2014."— Presentation transcript:

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

2 Adding Input Mask

3 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 (\).

4  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.

5  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.

6 Three Parts of an Input Mask

7  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.

8 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.

9 Creating an Input Mask

10 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

11 In the screen pane, click blank desktop database

12 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

13 In the MS Access Environment Right Click the “Table 1”.

14 Click Design View

15  Save first. Write your name inside the Table Name Box Click “OK” if done.

16  You are now in the Design View. 

17 How to add fields in the design view  Write first your Field Name.

18  Second, select from the data type that you want.

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

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

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

22 Input Mask: Creating

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

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

25 Right Click Table1. Click Datasheet View. Don’t forget to save your design view Putting it in the Datasheet View

26 You are now in the datasheet view  The blanks in that field will be like _____________

27 Entering a Value  When you enter see to it, it’s appropriate for that field

28 Creating an Input Mask in a Different Way

29  Repeat Slides 10-21.

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

31  There an Input Mask wizard.  Now you can select any of the input mask in the table. Click Next if done.

32  There you can write anything that you want. Click NEXT if done.

33  How do you want to store the data? With symbols or without. Click NEXT if done

34  A message has been encountered.  And click Finish.

35  Now you’re input mask has been updated.

36  Repeat Slides 25-27.

37 Input Mask Syntaxes CharacterDescription 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). LLetter (A through Z, entry required). ?Letter (A through Z, entry optional). ALetter or digit (entry required). aLetter or digit (entry optional). & Any character or a space (entry required). C Any character or a space (entry optional).

38 CharacterDescription., : ; - / 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.

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

40 Input Mask Example Input Mask DefinitionExamples 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 0L0T2F 8M4 00000-9999 98115- 98115-3007 >L<?????????????? Maria Pierre ISBN 0-&&&&&&&&&-0 ISBN 1-55615-507-7 ISBN 0-13-964262-5 >LL00000-0000DB51392-0493


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

Similar presentations


Ads by Google