resources lessons quizzes assignments discussion completion

Introduction to Microsoft Access 2003
Your Instructor: Craig Power
Lesson 01
Chapter 4

Fine Tuning

Scroll back up through the list of field names you've created until you find the field called Discount. Click your mouse anywhere on this row.

Click the Field Size text box in the Field Properties section. A down arrow will appear on the right side of this box. Click the down arrow to see a list of choices.

The Field Size List

Because you have indicated that you plan to enter a number in this field, you will need to set the field width a little differently than you would if this were a text field. Basically, you must indicate what type of numbers you plan to enter in this field by choosing from one of the following options:


  • Byte: Number must be between 0 and 255. Negative numbers prohibited. Decimals prohibited. Consumes 1 byte of disk space per record whether used or not.

  • Integer: Numbers between -32,768 and 32,767. Decimals prohibited. Consumes 2 bytes of disk space per record whether used or not.

  • Long Integer: Numbers between -2,147,483,648 and 2,147,483,647. Decimals prohibited. Consumes 4 bytes of disk space per record whether used or not.

  • Single: Accurate to 7 decimal places. Negative numbers okay. Consumes 4 bytes of disk space per record whether used or not.

  • Double: Accurate to 15 decimal places. Negative numbers okay. Consumes 8 bytes of disk space per record whether used or not.
  • Decimal Accurate to 28 decimal places. Negative numbers okay. Consumes 12 bytes of disk space per record whether used or not.
  • Replication ID A 16 character field you can use to give each record in your database its own unique identifier. Decimals and negative numbers prohibited. Don't worry about this one--you're not likely to ever need it.

Our discount numbers may contain decimals, so that rules out the Byte, Integer, Long Integer, and Replication ID options. And we don't need to waste disk space asking for 28 or even 15 decimal places. 7 levels of accuracy will be more than adequate, so let's go with Single.

Please select Single as the Field Size of the Discount field.

Tab down to the Format text box and another down arrow will appear on the right side of the box. Click the down arrow and choose Percent. This tells Access that we'd like a percent sign at the end of each number we type in this field.

Percent Format Selected

Finishing Up

Enough for now! Click the File menu and choose Save. A Save As dialog box will appear, asking you what you'd like to name your new table.

Save As Dialog Box

Type Customers in the Table Name text box and click OK.

Access will now warn you that there is no primary key defined. In each of the tables you create, Access would like you to create one field that will contain a unique value for each record. Access calls this special field the Primary Key.

In its purest form, the primary key acts as a counter, assigning a sequential record number to each record in your table.

In other words, the first record in your table is assigned the number 1, the second record in your table is assigned the number 2, and so on.

When Access warns you that you have no primary key defined, it will also offer to create one for you.

Click the Yes button, and each record you add to your table will automatically be assigned its own unique record number.

Once the table has been saved, click the View menu and choose Datasheet View.

Your table is now ready to accept the first customer record. The first field (ID) is your primary key. This field will be assigned a number automatically when you start entering data into the table.

Datasheet View of Table

TAB into the CustomerName field. Now, glance at the very bottom of the application window and you'll see the description you wrote for this field. Type Ray's Board Shop in the CustomerName field for this record. Press the TAB key again.

In the Contact field, type Ray Miller. Press TAB.

In the BillingAddress field, type PO Box 1452. Press TAB.

Fill in the rest of the fields as described below. Press TAB to move from field to field. If you find that you unintentionally left out one of the fields, just click the View menu at the top of the screen and choose Design View to add in any missing fields.

Then, click the View menu again and choose Datasheet View to return to your table.

FieldData
BillingCityEverett
BillingStateWA
BillingZip98203
BillingCountry 
ShippingAddress2344 Oak Ave #C2
ShippingCityEverett
ShippingStateWA
ShippingZip98203
ShippingCountry 
Phone205-121-1122
Fax205-121-1123
E-mail 
FirstOrder10/14/97
TermsNet 30
Discount5.50% (don't forget to type the % sign)
ResellerID 
ShipViaUPS
CreditLimit$2,000.00
SalesRepJenny Truman
DistributorNo (leave the box unchecked)
Locations1
Notes 


Back | Next

resources | lessons | quizzes | assignments | discussion | completion



Course content © Education To Go. All rights reserved. Reproduction or redistribution of any course material without prior written permission is prohibited.