Creating Your Own Templates
You can create your own templates based on a database that you have designed or modified. Creating a template is a relatively simple process that involves making a copy of the design elements of a database minus the data and then modifying the copy's database properties to mark it as a template and name it. Here are the steps to take:
- Choose the database that you will make the template from.
- Choose File, Database, New Copy from the menu.
- Leave the server at Local for now.
- Change the title of the database, if necessary.
- Change the filename, if necessary, and change the extension to .ntf.
- Click Database Design Only.
- Click OK. See Figure 2.25.
Figure 2.25. When creating a template, change the extension to .ntf.
CAUTION
When you are creating a database template, it should always be placed in the default data directory so that it can be chosen from the list of available template databases in the new database dialog box. If the template is placed in a subdirectory, it will not be available in this list.
You have created a design copy of the database, but it is not yet a full-fledged template. To make it a template, you have to change the database properties to give the template a name:
- Open the new template, and then open the Database properties box to the Design tab.
- Click the Database File Is a Master Template check box.
- Enter a name in the Template name field (see Figure 2.26).
Figure 2.26. The Design tab of the Database properties box specifies whether the database is a template or inherits from a template.
- Close the properties box.
NOTE
Templates do not actually have to be saved with an .ntf extension, but it is good practice to do so. You can turn a database file with an .nsf extension into a template by changing the database properties using the previous steps. However, the file will not be listed in the template listing when creating a new database unless it has the .ntf extension.
New databases can now be created from this template and can inherit design changes if the database and template both reside on a server because refreshing the design is accomplished through the server task. If a database and its template reside on a workstation, the design can be refreshed manually by choosing File, Database, Refresh Design from the menu.
When a new database is created, the default entry in the Access Control List is set to Designer and you are set as the Manager. You can set a default ACL that is stored in the template by placing square brackets around the entries that you want to inherit to the new database. If you choose to do this, make sure that you are listed as the Manager or Designer. Using the ACL of a template, you can change the default entry and add users, servers, or groups to the ACL. To do this, create another default entry with brackets, [-Default-] , in the ACL and set the access to No Access. Follow that with whatever additional groups, servers, and users you want to add, in brackets.