You are on page 1of 18

CREATING TABLES IN MS-ACCESS

BCA20 – BA, BB, BD, ACC Florence B. Reyes

 Build a table by entering field names and setting data types. Table Templates.  Can successfully create simple tables.  Create table using the Datasheet View. and Design View. .OBJECTIVE:  Students are expected to be familiar with MSAccess environment.  Create a relationship.  Update table values using a lookup field — a field that contains a list of choices.

Assign a File Name: CreatingTables_FamilyName then click create Type the desired file name 2. .HOW TO START CREATING A DATABASE? Open MS-Access application by clicking >Start Menu >All Programs >Microsoft Office>MSAccess  You start by creating a new. blank database  Click on the Blank Database  1. Click Create button 3.

4. That's your primary key. simply DOUBLE-CLICK the first field header and enter the primary key. then press ENTER. Notice how the new table contains a field called ID. .HOW TO CREATE A TABLE USING DATASHEET VIEW?  The new table opens automatically in Datasheet view. 4.

Repeat the process until you've entered names for all your fields but with a couple exceptions: don't add any lookup fields. . 5. and don't add foreign key fields. Go to the next blank field and enter a name in that header.HOW TO CREATE A TABLE USING DATASHEET VIEW? 5.

7. In the Save As dialog box. enter the name for the table and click OK. 7.HOW TO CREATE A TABLE USING DATASHEET VIEW? 6. Customer . When you've finished. 6. go to the Quick Access Toolbar and click Save.

. open the Data Type list and select an option. 3.HOW TO SET DATA TYPE?  After you enter field names. Just click the field header. you'll need to set the data type for each field. Select the field that needs a data type. If it isn't already selected. 2. click the Datasheet tab. 2. 1. 1. 3. In the Data Type & Formatting group.

click Table Templates. 2. 1. and then click the template you want to use. remove. Just make sure you save the table and give it a descriptive name. or change the fields.HOW TO USE THE TABLE TEMPLATES?  The templates capture data for common business needs. and all the fields and data types are set up for you. In the Tables group. . You can use the template right away — just start entering data — or you can add. 1. 2.   Click the Create tab.

4. 1. in the Tables group. or change fields. You can also open existing tables in Design view and add. 1. 3. click Table Design. .HOW TO CREATE TABLE USING DESIGN VIEW?   Design view allows you to build a table from scratch and set or change every available property for each field. 2. On the Create tab. remove.

4.HOW TO CREATE TABLE USING DESIGN VIEW? 1. . 2. 3. the first field you create should be your primary key field. And remember that you don't need to add any foreign key fields now. In the Field Name column of the designer. 2. You can do that when you create your relationships. enter the names of your table fields. As a rule.

3. use the Field Properties pane to set properties for individual fields. Optionally. 2. you can use the pane to change the values in a lookup field. For example.HOW TO CREATE TABLE USING DESIGN VIEW? 1. 4. 3. In the Data Type column. use the list next to a field name to choose a data type for that field. Don’t forget to save changes and give your new table a name that describes the data it contains . 4.

HOW TO USE THE LOOKUP? Lookup fields can store a list of options internally. 3. and click Next. click I want to lookup column to look up the values in a table or query. and in the Fields & Columns group. On the first page of the wizard. Switch your table to Datasheet view. 1. or they can look up data from fields in other tables. Click the Datasheet tab. ROW SOURCE TYPE: TABLE/QUERY  Make sure that the table/query already exist for the Lookup column. click Lookup Column to start the Lookup Wizard.  2. .

enter a name for the new field and click Finish. 4. The third page of the wizard. On the last page. Fourth page of the wizard will ask you what sort order you want for the List Box.HOW TO USE THE LOOKUP? 6. 7. . Fifth page of the wizard will allow you to adjust the columns for the look up field. 8. On the next page of the wizard. select the field(s) from the Available Fields: and click the arrow to the right so that the field(s) will be in the Selected Fields: and click next. 5. select the table that contains the field needed for your look up and click next.

2. On the next page of the wizard. one option per row. 4. make sure the Number of columns box contains a 1 and then enter your options in the grid. 3. 4. On the first page of the wizard. . On the third page of the wizard.HOW TO USE THE LOOKUP? 3. 5. click I will type in the values that I want and click Next. 1. enter a name for the new field and click Finish. 5.

1. and in the Fields & Columns group. You can do that by right-clicking the tab for the table and clicking Datasheet view. 1. 4. click Lookup Column to start the Lookup Wizard. 5. . Click the Datasheet tab. 2. Switch your table to Datasheet view. 2.HOW TO USE THE LOOKUP? ROW SOURCE TYPE: VALUE LIST 3.

select Edit Relationship… . Select the line that connects the table and right click. 3. Click the Datasheet tab. In the group Relationships select the Realtionships. 2. Add all the table at ones. 4.HOW TO CREATE A RELATIONSHIP? 1. On the Design tab click on the Show Table.

5.HOW TO CREATE A RELATIONSHIP? In the Edit Relationships dialog box. . check the three (3) check boxes and click on OK. Congratulations! you have a one-to-many relationship.

YOU CAN START YOUR ACTIVITY 1  Good Luck! .