- Today You Will Learn
- Why Automatic Access?
- Database Wizard or Template
- Table Wizard
- The Query Wizard
- Automatic Forms
- Automatic Reports
- Pages
- Summary
- Q&A
Database Wizard or Template
Microsoft calls the wizards that make an entire database application templates. Open or launch Access and look at the New File Task Pane. You'll find a section called New from template. There are at least two hyperlinks in this section. The top one, General Templates, is for launching templates stored locally on your personal computer or network. The other, Templates on Microsoft.com, is for using more templates Microsoft created and stored on its Web server. Obviously, you must be connected to the Internet to use the latter templates.
I've seen very few users who have created and used template (or wizard-generated) databases successfully. The wizards run just fine, but user needs tend to vary sufficiently from what the template provides; because of this, the generated applications lack necessary features and have added unneeded features that get in the way.
In theory, you should be able to create an application using a template and modify it to your needs. In practice, this remains one of those good ideas that might not work out. However, these templates do generate database structures that adhere fairly well to relationship structural rules, so at the very least, they're worthwhile to generate a few databases for study.
With those provisos out of the way, let's examine a template by walking through one.
The Template
If you don't want to follow along with the wizard, but want the resulting database, you can find ResourceScheduling1 on the CD, in the Day 3 folder. To create the database based on a template, follow these steps:
Launch Access if it's not already open. Locate the New from Template section from the New File Task Pane
-
Click the General Template hyperlink. This brings up the Templates dialog box. Click the Databases tab. Your screen should resemble Figure 3.1
Locate the Resource Scheduling template and highlight it by clicking it. Once the template is highlighted, click the OK button.
The default name for your new database will be ResourceScheduling1. You can name it whatever you choose, but for this example, just accept the default name. Click the Create button to make a new database from the template.
-
Click Next to move past the introduction screen. In the next step, you can choose to include optional fields. Optional fields are italicized. See Figure 3.2 for the tables and fields that the database wizard will create for you in your database.
Click Next to move to the style options. Choose the International style.
Click Next to move to printed style options. Choose the Formal option.
Click Next to get to the last step of the database wizard. In the last step, you can title your database. This is the title that you will see in the Title bar at the top of the main Access window and in message boxes. Leave the default title of Resource Scheduling and click the Next button.
In the last step of the wizard, check the option to start the database once it is created and click Finish.
The database wizard creates your database application and should appear as shown in Figure 3.3
TIP
If you choose to leave things at default, you can click Finish much earlier in the process to speed the wizard up.
Figure 3.1 Access provides several bundled database templates with many more available through the Microsoft Web site.
Figure 3.2 Select the fields that you want in your database.
If you tried deselecting any fields in step 5, you hit the message box saying you can't deselect this because the field or table is required. Not all is lost. If you choose the last table, Customer Information, then scroll the field list to the bottom, you'll find a few italicized fields that are optional. Even such strange fields like phone extension are mandatory due to the inherent inflexibility of the template.
Figure 3.3 Access uses a switchboard, or selection form, for its template-generated applications.
Play around with the switchboard to see all the objects you and the wizard created. Yes, this is a real Access application and in some ways, quite sophisticated too. You can see the database view down in the lower-left corner of your screen and in Figure 3.3, as well. Restore this window to see all the database objects in your new application. Figure 3.4 is the relationships window (choose Tools, Relationships from the menu) for this application. As noted above, this wizard generated application conforms to decent, if not ideal, database practices as far as structure is concerned. You can do a lot worse.
TIP
Press F11 for a quick way to show the database view.
Comments on Templates
At the chance of repeating myself, I've found few people who have used template- generated applications in practice. There always seems to be something missing, or too many things thrown in for this to work. Similarly, there seems to be a negative aspect to an entirely template-generated application compared to one generated one object at a time using the individual wizards that follow. What the template applications will show you is how to structure data well. I encourage you to create template applications and then view their objects in design view. Also try to get a feel for how Microsoft's engineers normalized the data for proper structure.
Figure 3.4 Templates adhere to good database programming practices.