Week 4 (Compatibility Mode)
Week 4 (Compatibility Mode)
Week 4 (Compatibility Mode)
Understanding Tables
A table is a set of columns and rows. Each column is called a field. Within a table, each field must be given a name and no two fields can have the same name. Each value in a field represents a single category of data. For example, a table might have three fields: Last Name, First Name, and Phone Number. The table consists of three columns: one for last name, one for first name, and one for phone number. In every row of the table, the Last Name field contains the last name, the First Name field contains the first name, and the Phone Number field contains the phone number. Each row in a table is called a record.
Understanding Tables
Understanding Tables
To add fields to a table: - Click the Add New Field column label. - Activate the Datasheet tab. - Click Rename in the Fields & Columns group. - Type the field name. - Press Enter. Access creates the field. - Type the next field name. Access creates the field. Continue until you have created all of the fields in your table. - Press Enter without entering a field name to end your entries. Or - Right-click the Add New Field column label. A menu appears. - Click Rename Column. - Type the field name. - Press Enter. Access creates the field. - Type the next field name. Access creates the field. Continue until you have created all of the fields in your table
Understanding Tables
Type the first field name in the Field Name field. Press the Tab key. Click the down-arrow that appears when you click in the Data Type field and then select a data type. 6. Click Primary Key if the column you created is a primary key. A small key appears next to the field name. 7. Press the Tab key. 8. Type a description. The description is optional. 9. Press the Tab key. Access moves to the Field Name field. 10. Repeat steps 3 through 10 until you have created all of your fields.
3. 4. 5.
To use the Lookup Wizard to create a lookup column: Open the Lookup Wizard
Open the table to which you want to add a lookup column. Click the field label for the field before which you want to add a lookup column. Activate the Datasheet tab. (You must be in Datasheet view.) Click the Lookup Column button in the Fields & Columns group. The Lookup Wizard appears. Make sure the radio button next to I want the lookup column to look up the values in a table or query. is selected. Click Next. The Lookup Wizard moves to the next page.
Click a radio button to select what you want to base your lookup column on. Choose from Tables, Queries, or Both. Click to select the table or query you want. Click Next. The Lookup Wizard moves to the next page.
Select fields
1. You choose the fields you want to appear in your lookup column. Be sure to include the primary key.
Click the field you want. Click the single right-arrow button . Access places the field in the Selected Fields column. Repeat this process to select additional fields. If you want all the fields in the table, click the double right-arrow button . Note: Use the single left-arrow and the double left-arrows to deselect fields. Click Next. The Lookup Wizard moves to the next page.
Sort fields
1. The Lookup Wizard allows you to sort the records in a lookup column. You can display records in order, either ascending (alphabetical from A to Z, lowest number to highest number, earliest date to latest date) or descending (alphabetical from Z to A, highest number to lowest number, latest date to earliest date). You can also sort within a sort. For example, you can sort by state and then within each state by city, and then within each city by street address. If you are creating a sort within a sort, create the highest level sort on line one, the next level sort on line two, and so on. In the state, city, and street address example, you create the state on line one, the city on line two, and the street address on line three.
Click the down-arrow and then select the field you want to sort by. Click to select a sort direction (the button toggles between ascending and descending). You can sort within a sort for up to four levels. Click Next. The Lookup Wizard moves to the next page.
Deselect Hide Key Column, if you wish. Adjust the column widths by dragging or double-clicking the right vertical border for the column. Click Next. The Lookup Wizard moves to the next page.
Specify the Key Field (if you deselected Hide Key Column)
A key field is a field that uniquely identifies a record. If you deselected Hide Key column, you must tell Access which field is the key field.
Click the key field. Click Next. The Lookup Wizard moves to the next page.
Type the name you want to give the column. Click if you want to allow multiple values in the field. Click Finish. Access creates the lookup column.
Click the down-arrow that appears when you click in the field. Click to select the entry you want. Press the Tab key.
To add an attachment to an attachment field: Double-click in the attachment field. The Attachments dialog box appears. Click Add. The Choose File dialog box appears.
Click the file you want to add. Click Open. The Choose File dialog box closes.
Click OK. Access attaches the file. Note: You can attach multiple files to a single attachment field.
Right-click in the field. A menu appears. Click Insert Object. The Microsoft Office Access dialog box appears.
Create New:
Click the Create From File radio button if you want to use an existing file.Type the path to the file or click the Browse button and locate the file. Click OK. Access links to the object.