Building Tables in Microsoft Access 2007
Description In this class, the attendee will learn the basics of creating tables and using tables. Because it is so important to pre-design the database before building it we will also explore how to and how not to design a database for current and future functionality.
Audience This class is appropriate for anyone new to designing a Microsoft Access database.
Objectives After completing this workshop, you should be able to: Create Tables Designate Primary Key Field Set Data Type Set Field Properties Create & Edit Lookup Wizards
Prerequisites Basic computer skills (PC)
Tables – Tables are the "meat" of Access. This is the most fundamental object within Access. All other objects build upon tables CCrreeaattee NNeeww TTaabblllee ((NNeeww DDaattaabbaassee))
Press the Microsoft Office button Select New
Fill in the File Name in the File Name: box Press the Create button
Instructional Technology 1 | Page Carson-Neman College ©2008
CCrreeaattee NNeeww TTaabblllee ((EExxiiissttiiinngg DDaattaabbaassee))
Select the Create tab
Select the Table icon
CChhaannggee ttoo DDeessiiiggnn vviiieeww
The new table (Table1) opens in datasheet view.
Change the view to Design view by selecting the Design view button
Fill in the new table name in the Save As box Press the OK button
Instructional Technology 2 | Page Carson-Neman College ©2008
DDeessiiiggnnaattee PPrriiimmaarryy KKeeyy
When you create a new table, Access automatically creates a primary key for you and assigns it a field name of "ID" and the AutoNumber data type.
Sometimes, you may already have data, which you want to use as a primary key. (Example, students have existing ID numbers given to them at the time of admission).
What makes a good primary key?
Each record has a unique value for the field The field information never changes The field information is never empty or has a null value
To Change the Primary ID
Fill in the new Field Name Change the DataType if there is existing data to fill in this field.
Data Types
Text Memo Number Date/Time Currency AutoNumber Yes/No OLE Object Hyperlink Attachment Lookup Wizard…
Instructional Technology 3 | Page Carson-Neman College ©2008
Text
Memo
Number
Instructional Technology 4 | Page Carson-Neman College ©2008
Date/Time
Currency
AutoNumber
Instructional Technology 5 | Page Carson-Neman College ©2008
Yes/No
OLE Object
Hyperlink
Attachment
Lookup Wizard…
Instructional Technology 6 | Page Carson-Neman College ©2008
CCrreeaattee aanndd SSeettuupp LLooookkuupp WWiiizzaarrdd……
Set the Datatype to Text , Number or Yes/No Select Lookup Wizard… from the drop down menu
Select whether you have an existing table of information to look up or you want to type a new one Choose the number of columns to use in the look up if you are typing in new information Type in the information. (Use down arrow on keyboard to move to the next record. Do not use the Enter key ).
Press the Next button Press the Finish button
Instructional Technology 7 | Page Carson-Neman College ©2008
To view the field in datasheet mode:
Select the View as Datasheet icon Save the table
View list by selecting the Record Data Dropdown menu
NOTE: Do not choose the Filter Field Dropdown menu
Instructional Technology 8 | Page Carson-Neman College ©2008