Modules >>
Access I >>
Creating a database table (Access 97)

Open the Access program on your computer. On the pop-up window, you will have three selections:

  1. Create a New Database Using Blank Database (select this one)
  2. Create a New Database Using Database Wizard
  3. Open an Existing Database

Choose the first option to create a blank database.

If you already had the Microsoft Access program open, then you would go to the File menu and select "New" to create a new, blank database. Another pop-up window will appear as follows:

creatdbase.jpg (26250 bytes)

This time you need to choose the drive and folder in which to store the file and provide a file name for it.  In the above example, the default file name is "db1."   Change this to "XXXdbase" with XXX being your initials. Click the "Create" button to make your database file.  In Access 97, you will see the following window:

dbasewin.jpg (19745 bytes)

In Access 2000, it would look like the following:

dbwin00.gif (7295 bytes)

As you can see, there are many components to a database file in Access. Each section in the above window shows this. A database contains one or more tables, which look much like spreadsheets. Each row in a table represents an individual record in the database, whereas each column represents a field.  This is demonstrated in the following image

sttable.jpg (19866 bytes)

A particular record may be looked up quickly by designating important fields as keys. To learn more about what a database is, please go to the PC Webopedia website at http://www.pcwebopedia.com/ and look up the keyword "database."

For your assignment, you will need to define fields that will be used to track your students. The seven fields you need to include are as follows: last name, first name, parent name, parent phone number, parent email, birthday, and medical info.  Click on the "Table" section in the above window, then click "New" and then choose "Design View" to create your table.  You will see the following window:

dbtable.jpg (19477 bytes)

The above table will allow you to define the six fields you would like to use to collect information on your students.  For example, in the first row, you would type "Last Name."  In the second column, you can choose from one of the following data types: text, memo, number, date/time, currency, autonumber, yes/no, OLE object, hyperlink, and lookup wizard.  For the first field, we will use the "text" data type.  This type is chosen by default.  To select any other data type, you would click on the cell, then make your selection from the drop-down menu that appears. The third "description" column in the above window is optional. It can be used to provide any additional information about the field that you wish to include.

Next, you will need to set your "primary" key for the database. This is a field whose value uniquely identifies each record in a table. Since this database is about student information, the "Last Name" field will be set as the primary key. To do this, go to the "Edit" menu and select the "Primary Key" option. You will see a key symbol appear to the left of the field name. Enter the six remaining fields mentioned above and any others you would like to include. Change the data type according to the field. For example, the birthday field will use the "date/time" data type and the parent email field will use the "hyperlink" data type.  Note that, when entering the email address in the email field, you must insert "mailto:" before the address in order for the program to recognize it as an email hyperlink.   Make sure there is no space before this text and the email address. If I were to simply enter "compined@uvic.ca" in this field, then the the program would see it as a webpage address and read it as "http://compined@uvic.ca" which would not work properly so that, when you click on it, your email program will open. 

Once you have created and defined all the fields for your database, please do the following:

Please continue onto the next section on Entering Data & Using a Form.

arrow_orange_stubby_up.gif (875 bytes)

Copyright © 2001-2002 Valerie Irvine. All rights reserved.
Revised: October 29, 2002.