Lecture Access – Tables. What are Tables? Records Fields.
-
date post
21-Dec-2015 -
Category
Documents
-
view
221 -
download
3
Transcript of Lecture Access – Tables. What are Tables? Records Fields.
![Page 1: Lecture Access – Tables. What are Tables? Records Fields.](https://reader035.fdocuments.net/reader035/viewer/2022062421/56649d635503460f94a457fc/html5/thumbnails/1.jpg)
Lecture
Access – Tables
![Page 2: Lecture Access – Tables. What are Tables? Records Fields.](https://reader035.fdocuments.net/reader035/viewer/2022062421/56649d635503460f94a457fc/html5/thumbnails/2.jpg)
What are Tables?
Records
Fields
![Page 3: Lecture Access – Tables. What are Tables? Records Fields.](https://reader035.fdocuments.net/reader035/viewer/2022062421/56649d635503460f94a457fc/html5/thumbnails/3.jpg)
Creating a New Table
Access 2007Access 2007
1. Create Ribbon2. Table Design
![Page 4: Lecture Access – Tables. What are Tables? Records Fields.](https://reader035.fdocuments.net/reader035/viewer/2022062421/56649d635503460f94a457fc/html5/thumbnails/4.jpg)
Adding Fields
The name of the Field to be used throughout the
Database. Field names must be unique per table.
Avoid using spaces, and be careful with your spelling.
![Page 5: Lecture Access – Tables. What are Tables? Records Fields.](https://reader035.fdocuments.net/reader035/viewer/2022062421/56649d635503460f94a457fc/html5/thumbnails/5.jpg)
Field Data Types
Data Types specify the kind of information that is going
into each Field. This helps keep the data consistent, so
that you can use it later in Reports and Queries. What
good is a Number field if someone types text into it,
right?
![Page 6: Lecture Access – Tables. What are Tables? Records Fields.](https://reader035.fdocuments.net/reader035/viewer/2022062421/56649d635503460f94a457fc/html5/thumbnails/6.jpg)
Field Data Types (cont.)
• Text• Memo• Number• Date/Time• Currency• AutoNumber• Yes/No
Press F1 while choosing a Data Type for help on the available choices!
![Page 7: Lecture Access – Tables. What are Tables? Records Fields.](https://reader035.fdocuments.net/reader035/viewer/2022062421/56649d635503460f94a457fc/html5/thumbnails/7.jpg)
Field Properties
Each Field, in addition to its Data Type, has
a number of Properties that can further
define its behavior. A text field, for example,
can be limited in its size, be required, have a
default value, etc. This can help your users
save time and ensure your data stays clean.
Help on each Property appears here.
![Page 8: Lecture Access – Tables. What are Tables? Records Fields.](https://reader035.fdocuments.net/reader035/viewer/2022062421/56649d635503460f94a457fc/html5/thumbnails/8.jpg)
Field Properties (cont.)
• Field Size• Format• Decimal Places• Input Mask• Default Value• Required
These are the more common Field Properties.
Your choice of Field Properties will depend on the Data Type you are modifying.
![Page 9: Lecture Access – Tables. What are Tables? Records Fields.](https://reader035.fdocuments.net/reader035/viewer/2022062421/56649d635503460f94a457fc/html5/thumbnails/9.jpg)
Primary Keys
• The AutoNumber datatype is great for primary keys because they are automatically assigned as new records are added, and cannot be changed.
• When you save a Table for the first time, Access will recommend you designate a Primary Key.
![Page 10: Lecture Access – Tables. What are Tables? Records Fields.](https://reader035.fdocuments.net/reader035/viewer/2022062421/56649d635503460f94a457fc/html5/thumbnails/10.jpg)
Viewing Table Data
Toggles between Design and View mode.
Double-Click
![Page 11: Lecture Access – Tables. What are Tables? Records Fields.](https://reader035.fdocuments.net/reader035/viewer/2022062421/56649d635503460f94a457fc/html5/thumbnails/11.jpg)
Editing Table Data
“Empty” record ready for data
Edit data just like Excel.
Record navigation and count.
![Page 12: Lecture Access – Tables. What are Tables? Records Fields.](https://reader035.fdocuments.net/reader035/viewer/2022062421/56649d635503460f94a457fc/html5/thumbnails/12.jpg)
Column Width
![Page 13: Lecture Access – Tables. What are Tables? Records Fields.](https://reader035.fdocuments.net/reader035/viewer/2022062421/56649d635503460f94a457fc/html5/thumbnails/13.jpg)
Sorting
![Page 14: Lecture Access – Tables. What are Tables? Records Fields.](https://reader035.fdocuments.net/reader035/viewer/2022062421/56649d635503460f94a457fc/html5/thumbnails/14.jpg)
Access with Excel
• Access and Excel “talk” to each other:– Importing– Exporting– Linking
![Page 15: Lecture Access – Tables. What are Tables? Records Fields.](https://reader035.fdocuments.net/reader035/viewer/2022062421/56649d635503460f94a457fc/html5/thumbnails/15.jpg)
Importing from Excel
![Page 16: Lecture Access – Tables. What are Tables? Records Fields.](https://reader035.fdocuments.net/reader035/viewer/2022062421/56649d635503460f94a457fc/html5/thumbnails/16.jpg)
Importing from Excel (cont.)
Do not import the FullName or Location columns.
![Page 17: Lecture Access – Tables. What are Tables? Records Fields.](https://reader035.fdocuments.net/reader035/viewer/2022062421/56649d635503460f94a457fc/html5/thumbnails/17.jpg)
Table Relationships
Databases almost always have multiple tables that are all related.
CustomersCustomers Line ItemsLine Items
PaymentsPayments
InvoicesInvoices
EmployeesEmployees
![Page 18: Lecture Access – Tables. What are Tables? Records Fields.](https://reader035.fdocuments.net/reader035/viewer/2022062421/56649d635503460f94a457fc/html5/thumbnails/18.jpg)
Relationships in Access
• Databases store the Relationships between tables to keep things straight.
• When a Lookup is defined for a field, a Relationship is automatically created.
• In Access, Relationships are displayed with the Relationships toolbar icon.
![Page 19: Lecture Access – Tables. What are Tables? Records Fields.](https://reader035.fdocuments.net/reader035/viewer/2022062421/56649d635503460f94a457fc/html5/thumbnails/19.jpg)
Relationships in Access
![Page 20: Lecture Access – Tables. What are Tables? Records Fields.](https://reader035.fdocuments.net/reader035/viewer/2022062421/56649d635503460f94a457fc/html5/thumbnails/20.jpg)
Lookup Fields
• Create a drop-down menu• Menu choices can be linked to other
tables (dynamic) or specified (static)• Used to link records across tables, ie:
– Invoice to Customer– Employee to Invoice
• Can require user to choose from your list(great for consistency)
![Page 21: Lecture Access – Tables. What are Tables? Records Fields.](https://reader035.fdocuments.net/reader035/viewer/2022062421/56649d635503460f94a457fc/html5/thumbnails/21.jpg)
Lookup Fields (cont.)
In our Orders table, we want the ProductID field to be a drop-down choice based on the Products table. We want to show the Product Name but store the ProductID number.
![Page 22: Lecture Access – Tables. What are Tables? Records Fields.](https://reader035.fdocuments.net/reader035/viewer/2022062421/56649d635503460f94a457fc/html5/thumbnails/22.jpg)
Helpful Hints
• Always have a Primary Key• ZIP Codes and Phone Numbers are Text• Double-check your spelling• Spaces matter, CAPS do not• Percentages are Numbers, with field
size Single, and .00% as inputmask• Test a Lookup as soon as you make it
![Page 23: Lecture Access – Tables. What are Tables? Records Fields.](https://reader035.fdocuments.net/reader035/viewer/2022062421/56649d635503460f94a457fc/html5/thumbnails/23.jpg)
Close Access BEFORE you upload
• Temp “locked file” open• Access must be closed to
effectively close this file• If you upload while Access is open,
the database becomes damaged and unusable.