Before we build forms, let's tidy up the structure from the end of Lesson 4.
Hi, this is Crystal
The music for this lesson is Melanie Phippard's latest hit, Malibu Barbie.
{music by Melanie Phippard}
To be consistent with naming of tables, remove the "s" from the ends of table names since they are prefixed.
Like tracking fields, another field I often add is an Active flag.
The field name is IsActiv. The Data Type is Boolean, which is listed as Yes/No.
The Default Value will be True, which is -1 in Access.
In the Contact Categories table, add a little 'c' before a few the fields
to indicate a category for Contact versus another type of category.
Since the active flag will be added to other tables, copy it.
Click in the selector box to the left of the fieldname to select the field definition.
Press shortcut key to copy (advantage using this method is that you can copy multiple field definitions at a time).
Go to the design view of the contacts table and paste the copied field.
Also in the contacts table, rename CatID to cCatIDc, which will be the default contact category.
Down the road, we will add a cross-reference table so that contacts can be in more than one category.
Each time a table design changes, adjust the relationships diagram.
Add IsActiv field to other tables. { music by Melanie Phippard }
Open the contacts table and look at the data.
What is in the Title field is really a Job Title. The field should be renamed so it is more descriptive.
Field Name and Description can be changed using the Fields ribbon in the Table Tools group when looking at the data sheet view.
A field will still be needed for the Salutation Title so Cut the existing description to the clipboard.
The reason we rename this field is because data is there.
In Design View, the field name has changed, as well, to JobTitle.
Insert a field for Salutation Title.
To be clear, call the field Salut, paste the description from the clipboard, and modify.
Use the Datasheet View of the table to add information in the Salut field.
Default Value only applies to new records, not existing records so
open each table where IsActiv got added and set to True for each record.
If there were more records, it would be faster to use Update Queries to change the data.
Collapse the ribbon and navigation pane to focus on the relationships diagram.
Main forms and subforms will be designed according to the data structures.
The main form will be based on the Contacts table.
There will be subforms to enter addresses, phone numbers, email addresses, and websites.
Each contact can have a default category assigned which will be collected using a combobox.
Thanks for watching and thanks to Melanie for sharing her music.
Next time we really will build a form.
Data Structure is an iterative process.
Through sharing, we will all get better.