Modules >>
Access I >>
Creating a database table (Access XP)
Open the Access program on your computer. If you choose File/New, you will be able to see a "New File" window on your screen (shown below). Choose "Blank Database" from the options provided.
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:
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 "XXXdbase1" with XXX being your initials. Click the "Create" button to make your database file. You will see the following window:
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
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:
Click on the "Table" section in the above window, then click "Create Table in Design View" to create your table. You will see the following window:
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" under the "Field Name" column. 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,
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 between 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.
![]()
Copyright © 2001-2002 Valerie Irvine. All rights reserved.
Revised: October 29, 2002.