Wednesday, March 24, 2010

Access 2007 Bug: Template 'xxx.accdt' could not be instantiated.

There is a newly reported bug in Access 2007 which prevents the instantiation of a database (accdb) from an Access template (accdt).

Template 'xxx.accdt' could not be instantiated.
An unexpected error occurred when opening the template.

The XML encoding of the "&" symbol when used in the name of a database object like a table, query, form, report, macro or module.

Reproduce The Error:

  1. Name a database objects (form, report, etc.) with an '&' in the object name.

  2. Create a template (accdt) from the database.

  3. Double-click the saved accdt file.

  4. The instantiation will fail when it tries to create the object.
Avoid using the & in any database object name.

It doesn't appear to be an issue when an '&' is used in a control within those database objects.  It also does not seem to effect the original database or creation of the template, just instantiating a new database from the template.

Yet another good reason NOT to use non-standard characters in your object names.


Anonymous said...

Interesting... As every template I try and download from the Office site gives me this error... DAng!

Anonymous said...

That's good to know....I was just reading about how you should save your database like this so that people can read it without changing things. I wouldn't have thought to look for the & symbol. So now at least if I ever run into that situation I know what to check.

Anonymous said...

Huge help - thanks so much!!!