Introduction to MS Access - San Francisco State University

download report

Transcript Introduction to MS Access - San Francisco State University

Introduction to MS Access
Creating a New Database
• File/New
– Blank database
– New database name and location
Access Objects
• Tables
– Create a new table: Create/Table Design
– Open a table:
• Double click the table name
– Home/View:
• Datasheet view
• Design view
• Queries
– Create a new query: Create/Query Design
• Others: Forms, Reports
Creating a Table
• Create/Table Design:
– Field name
– Field data type
• Don’t use the AutoNumber type
• Create a primary key
– Don’t use the default ID field for primary key.
• Enter data
Example: Create an Employee
Table
• Database name: HRdatabase
• Table name: Employee
• Table fields:
–
–
–
–
–
EmpID: Text, 10 characters
EmpName: Text, 30 characters
Sex: Text, 1 character
HireDate: DateTime field
Salary: Currency field
Create a new Query
• Create/Query design/Show table
– Select fields
– Add criteria
• Sorting
• Total and subtotal
– Query design tools/Total
– A Total row is added to the design view
– Select function from the total row’s dropdown list
Creating a New Form
• Using Form Wizard
– Create/Form
– Create/More Forms/Form Wizard