UseExcel: A Quick Test of the Contacts Table

The objective of this lesson is to ensure we can enter values in the fields we have created and that the values look the way we expect them to look.

Open the ContactsDB.mdb database if it closed and go to the Object window for Tables. Open the Contacts table by either double- clicking the name, or selecting it and pressing Enter, or by right-clicking on the name and selecting Open.

The cursor will be in the ContactID field and it should say (AutoNumber) as a value. You cannot enter a value such as 1 in this field. Access will add it for you when you start entering values in any other field but ContactID.

Tab to Salution and enter "Mr." Access creates a ContactID of 1. Tab to FirstName and enter "Robert". Continue tabbling and entering a value in every field.

Some things to note. As soon as you enter the first digit in HomePhone, Access enters "( ) ___-____" for you. After you enter "0123" for the ext. field, Access retains the leading zero because this is a Text data type field, not numeric. We don't have an input mask for Birthday, so we have to enter both backslashes as in 5/12/1980. Tab and enter all the way to the end. Even add a Comment.

Before you do anything else, look to the very left in the window for a pencil icon. This indicates that the record or row is "dirty". That is, you have started editting the record, in this case creating and editting, but you have not saved the record yet.

To save the record either select the Records menu, Save Record, or press Shift-Enter, or move to the next, and in our case, new record. A new record has an asterisk (*) on the far left, where you saw the pencil icon. After you save the first record, the pencil icon is replaced with a right-pointing black triangle. It resembles a pointer, pointing to the record you have selected.

More things to note. In Lesson 2, "Access Contact Table Specifications" I or we, made some mistakes which I have just noticed when entering the first record. This often happens in Access table design since there are so many properties to consider.

Select the first record and start tabbing across. In the Salutation field, look at the bottom of the window at the status bar. It should say "Salutation". The field name should also say "Salutation". Tab to FirstName. We expect to see "First Name" in the status bar as well as "First Name" as the field name, but instead we see "FirstName". This doesn't make the database terribly wrong, but it's not "user friendly".

To go back into the table design, look for the greenish triangle in the top left hand corner of the window. Or in the View menu, select Design View. Let's review the Descriptions and Captions. FirstName does not have a caption. Add it - "First Name". Same for NickName, Address1.

Now I see that we missed adding Address2. Select the City field name row and select the Insert menu, Rows. Enter field name Address2, Text data type, description Address 2, field size 255, caption Address 2, required No, allow zero length Yes. Change the field size of Address1 to 255 as well.

Country needs a caption, as well as Home Phone, Work Phone, FaxNumber, Comments. Increase the Comments field size to 255.

Now we know that the Caption property affects the field name in the table data entry view and the Descrption property affects the status bar when you select a particular field.

Save the table design and close it or open the table for more data entry. We will enter a second row and observe our new changes.

As in the test for record 1, enter a value for each field (except ContactID of course). Pay attention to the status bar and the field names. The only field that is not consistent with the others in terms of field name is WorkExt. The Caption property is "ext.". But as we shall see later, we may be pressed for space in our data entry form, so we'll leave this as is for now.

Before we close this lesson, it is recommended that your users not enter data through the table view just as we were testing. It is recommended that user do data entry and changed using a form. Creating forms will be the second next lesson. The reason for these recommendations is that though a table view, it would be easy to delete some or all records. Perhaps there are some fields that your users should not or do not want to see. In a table, users can see everything. In a form you can determine what is seen, what is not seen, what is protected, what can be changed.

I will rename and save the database as ContactsDBv1.mdb.

ContactsDBv1

Previous page - Contacts Table Specifications Next page - Review: Is the Contacts Table Well Designed?

[Top of Page]

Excel is a registered trademark of The Microsoft Corporation.