Back
Access

Access 2010: Application Parts and Data Type Parts

One of our goals with Access 2010 was to make it easier to reuse your database design work. In the Access 2007 Developer Extensions, we allow you to save a database as a template, making it available for others to use either as a starting point or a ready-to-use application. In Access 2010, you now can also save the database or a collections of fields as a new kind of template— a part.

Application Parts

An application part is an Access template that you can add to an existing database, to extend its functionality. An application part can be as simple as a single table, or it can include several database objects, including tables, forms, reports, and even relationships. In Access you can open up the Application Parts gallery to view the built in parts. Some like the blank forms are simple one form parts designed to make creating common forms easier while others, like the Contacts part, are more complex and contain tables, queries, forms, reports, macros, and modules.

clip_image001[4]

To create your own application part simply strip a database down to just the objects that you require in the part, then save it as a template through the “Save & Publish” place in the backstage.

clip_image003[4]

clip_image004[4]

When you save an application part there are few things you need to set for parts.

Name – Required.

Description – Appears in the hover tooltips.

Category – You can pick from the list or type in a new one, this will determine which section of the application parts gallery (see above) your part will appear. You can use this to better organize your parts.

Icon – This will appear in the application parts gallery.

Primary Table – When you instantiate a template from the gallery that has at least one table into a database that has at least one table, Access will launch a relationship wizard to help you connect the part to the rest of your database. The table you select here will be the default that appears in the wizard (you can change this).

Instantiation Form – You can pick a form in your part that will be run once right after the part is instantiated and will be deleted when closed. This can be useful as a splash screen or if you have more complicated part that requires some form of setup code before it can be used.

Application Part – If checked then the template will appear both in the Access Getting Started place (under My Templates) and in the Application Parts Gallery.

Include Data in Template – If checked Access will save the current set of table data with the template.

Now that you created your part it will appear both in the My Templates folder of the New Place as well as in the Application Parts Gallery.

Data Type Parts

A data type is an Access template that you can apply to an existing table, to extend its functionality. A data type part can be as simple as a single field, or it can include several fields with multiple data types, validation rules, default values and value list lookups with data. In your table designer you can open up the More Fields gallery to view the built in parts listed under the Quick Start Category. Some, like the Category field part, are simple one field parts and others, like Address, contain multiple fields that are added to your table with one click.

clip_image006[4]

To create your own data type part simply highlight just the fields that you want and in the More Fields gallery choose “Save Selection as New Data Type”

clip_image007[4]

Name – Required.

Description – Appears in the hover tooltips.

Category – You can pick from the list or type in a new one, this will determine which section of the more fields dropdown your part will appear. You can use this to better organize your parts.

Instantiation Form – You can pick a form in your part that will be run once right after the part is instantiated and then deleted when closed. This can be useful as a splash screen or if you have more complicated part that requires some form of setup code before it can be used.

Where did you put my parts?

All templates and parts created from Access are stored in the following folder. The AppData folder is hidden in windows by default, you can learn how to unhide it here.

C:Users[USERNAME]AppDataRoamingMicrosoftTemplatesAccess

You can additionally add templates and parts to a non-user specific folder and they will appear in the product. (Note the path below is for English versions of Access.)

C:Program FilesMicrosoft OfficeTemplates1033Access