Day 20: Access Chapters 5, 6, 7
description
Transcript of Day 20: Access Chapters 5, 6, 7
![Page 2: Day 20: Access Chapters 5, 6, 7](https://reader035.fdocuments.in/reader035/viewer/2022062314/56813e11550346895da7f08a/html5/thumbnails/2.jpg)
2
LAST CLASS
• Reports– Design View– Layout View– Report View– Print Preview
• Report Wizard• Labels
![Page 3: Day 20: Access Chapters 5, 6, 7](https://reader035.fdocuments.in/reader035/viewer/2022062314/56813e11550346895da7f08a/html5/thumbnails/3.jpg)
3
DATA VALIDATION
• Data validation is a set of properties that controls how data is entered into a field– Required– Default Value– Validation Rule– Input Mask
![Page 4: Day 20: Access Chapters 5, 6, 7](https://reader035.fdocuments.in/reader035/viewer/2022062314/56813e11550346895da7f08a/html5/thumbnails/4.jpg)
4
REQUIRED
• A required field must have a value when you create a new record. It can not be left blank.
• By default, required is set to no for all fields except for the primary key.
• Primary keys are required since they are used to identify the records.
![Page 5: Day 20: Access Chapters 5, 6, 7](https://reader035.fdocuments.in/reader035/viewer/2022062314/56813e11550346895da7f08a/html5/thumbnails/5.jpg)
5
DEFAULT VALUE
• If you have a common value in a field that is used more often than not you can set it as the default value for the field.
• The default value will automatically be used when you create a new record and leave the field blank.
• The Date() function can also be used as a default value to use the current date for new records
![Page 6: Day 20: Access Chapters 5, 6, 7](https://reader035.fdocuments.in/reader035/viewer/2022062314/56813e11550346895da7f08a/html5/thumbnails/6.jpg)
6
VALIDATION RULE
• Validation rules restrict the data values that can be entered into a field
• Examples:>= 7.5
> #01/01/2010#
• Validation rules do not make the field required
![Page 7: Day 20: Access Chapters 5, 6, 7](https://reader035.fdocuments.in/reader035/viewer/2022062314/56813e11550346895da7f08a/html5/thumbnails/7.jpg)
7
VALIDATION TEXT
• Validation text allows you to specify a message that will be displayed when the validation rule is broken
• If validation text is not entered the user will see the default message: “One or more values are prohibited by the validation rule ‘rule’ set for ‘TableName.FieldName’. Enter a value that the expression for this field can accept.”
![Page 8: Day 20: Access Chapters 5, 6, 7](https://reader035.fdocuments.in/reader035/viewer/2022062314/56813e11550346895da7f08a/html5/thumbnails/8.jpg)
8
INPUT MASK
• Input masks allow you to restrict the data being input for text and data types to exactly the format you specify
• Examples:– Phone numbers– Social Security numbers– Zip codes– Dates
![Page 9: Day 20: Access Chapters 5, 6, 7](https://reader035.fdocuments.in/reader035/viewer/2022062314/56813e11550346895da7f08a/html5/thumbnails/9.jpg)
9
SQL
• All queries are handled internally as SQL• SQL stands for Structured Query
Language• You can see and edit the SQL that makes
up a query from SQL View
![Page 10: Day 20: Access Chapters 5, 6, 7](https://reader035.fdocuments.in/reader035/viewer/2022062314/56813e11550346895da7f08a/html5/thumbnails/10.jpg)
10
SELECT
• A SELECT statement is used to retrieve data from the tables in a database
• Four main keywords– SELECT– FROM– WHERE– ORDER BY
![Page 11: Day 20: Access Chapters 5, 6, 7](https://reader035.fdocuments.in/reader035/viewer/2022062314/56813e11550346895da7f08a/html5/thumbnails/11.jpg)
11
JOIN TYPES
• INNER JOIN– Only records where the keys match
• RIGHT JOIN– All records from the right table and matches
from the left
• LEFT JOIN– All records from the left table and matches
from the right
![Page 12: Day 20: Access Chapters 5, 6, 7](https://reader035.fdocuments.in/reader035/viewer/2022062314/56813e11550346895da7f08a/html5/thumbnails/12.jpg)
12
NEXT CLASS
• Access Exam Review Project
![Page 13: Day 20: Access Chapters 5, 6, 7](https://reader035.fdocuments.in/reader035/viewer/2022062314/56813e11550346895da7f08a/html5/thumbnails/13.jpg)