If you look in the Wedding List sample database (WeddingList.accdb) included on the companion CD, you’ll find it very simple, with one main table and a few supporting tables for data such as titles, cities, and groups. Most databases are usually quite a bit more complex. For example, the Proseware Housing Reservations sample database contains six main tables, and the Conrad Systems Contacts sample database contains more than a dozen tables. If you had to create every table manually, it could be quite a tedious process.
Fortunately, Access 2010 comes with a new feature called Application Parts to help you build a few common tables and other database objects. Let’s move on to a more complex task—building tables like those you find in Conrad Systems Contacts. To do this, click the File tab on the Backstage view and then click New. This returns you to the New tab, ready to define a new blank database. For this exercise, create a new blank database and give it the name “Contact Tracking.” We’ll use this database to start building tables like some of those you saw in Chapter 3.
To build a table using one of the Application Parts, close the table that Access 2010 created when you opened the database (Table1), click the Create tab on the ribbon, and then click the Application Parts button in the Templates group. Access displays a list of 10 form types under the Blank Forms category and five Application Parts under the Quick Start category, as shown in Figure 4-12. Microsoft also uses the term Models to refer to this one-click object creation feature. You’ll learn more about using the 10 form Application Parts in Chapter 13.
The five Application Parts under Quick Start, which represent some of the more common types of table structures and objects found in databases, are as follows:
Comments. Use this Application Part when you need a table to track various comments. Clicking this option creates one table with a comment date and comment fields.
Contacts. Use this Application Part when you need to track your personal or business contacts. Clicking this option not only creates a Contacts table, but it also creates a query, three forms, and four reports to work with that Contacts table. With one click, you are well on your way to creating a functional application to track your contacts. Key fields in the Contacts table include the contact’s company, job title, and phone numbers.
Issues. Use this Application Part for recording various personal or business issues. Clicking this option creates an Issues table as well as two forms to work with that table. Some key fields in the Issues table include the title of the issue and the issue status.
Tasks. Use this Application Part for keeping track of various tasks and projects needing completion. Clicking this option creates a Tasks table as well as two forms to work with that table. Key fields in the Tasks table include start and due dates for the task and percentage complete.
Users. Use this Application Part for maintaining a list of users for your database. Clicking this option creates a Users table as well as two forms to work with that table. Key fields in the Users table include the email, full name, and login information.
The five Table Templates from Access 2007 do not exist in Access 2010. Microsoft replaced the Table Templates with various Application Parts in Access 2010 so you can quickly build fields, tables, and other database objects commonly found in most databases.
Click Contacts in the Quick Start list, and Access 2010 builds a complete table structure for a contacts table as well as other supporting objects, as shown in Figure 4-13. Access creates a total of 20 fields to identify the data elements for this contacts table. Use the horizontal scroll bar or press Tab to see the field names to the right. This contacts table Application Part includes fields such as Company, First Name, Last Name, E-mail Address, Job Title, and so on to identify a single subject—a contact. The Quick Start command also automatically defines a data type for each of these fields.
See Table 4-1, for a full discussion of the various data types available within Access 2010.
Figure 4-13. The Quick Start command builds a complete table with appropriate field types and supporting objects.
By default, Access 2010 assigned the name ID to the first field in this Contacts table. This field name is not very descriptive, so we will rename this field ContactID. There are several ways to rename a field using Access 2010, but for now we will focus on one of the easiest methods—renaming the field directly from Datasheet view. Double-click the heading of the ID field and then type ContactID, as shown in Figure 4-14. After you press Enter, Access immediately renames the field. Save the change to this table now by clicking the Save button on the Quick Access Toolbar.
Figure 4-14. You can double-click a column heading in Datasheet view to change the name of the field.
You will further change this Contacts table later in this chapter and in Chapter 5 so that it is more like the final tblContacts table in the Conrad Systems Contacts database. For now, close the Table window so that you can continue building other tables you need. Also, let’s delete all the other supporting objects the Application Part command created so we can concentrate just on the tables for now. Highlight the query called ContactsExtended in the Navigation pane and then press Delete. Click OK in the confirmation dialog box when Access prompts you to delete the object. Continue deleting the remaining three forms and four reports until you are left with just the Contacts table in the Navigation pane.