Microsoft KB Archive/826763

= Special characters that you must avoid when you work with Access databases =

Article ID: 826763

Article Last Modified on 8/22/2007

-

APPLIES TO


 * Microsoft Office Access 2007
 * Microsoft Office Access 2003
 * Microsoft Access 2002 Standard Edition
 * Microsoft Access 2000 Standard Edition
 * Microsoft Access 97 Standard Edition

-



This article applies to either a Microsoft Access database (.mdb) file or to a Microsoft Access database (.accdb) file, and to a Microsoft Access project (.adp) file.

Novice: Requires knowledge of the user interface on single-user computers.



SUMMARY
Microsoft Access does not restrict the use of special characters such as a number sign (#), a period (.), or a quotation mark (&quot;) in the database object names or in the database field names. However, if you do use the special characters, you may experience unexpected errors. Therefore, Microsoft recommends that you do not use the special characters in the database object names in the Access database or in the database project. This article discusses the special characters that you must avoid because of known issues with these special characters.



MORE INFORMATION
When you work with Access or with some other application such as a Microsoft Visual Basic application or an Active Server Pages (ASP) application, you must avoid the following special characters:

Access Naming Conventions
Microsoft recommends that you do not use a period (.), an exclamation mark (!), a grave accent (`), a bracket ([ ]), a space, or a quotation mark (&quot;) inside the names of functions, the names of variables, the names of fields, or the names of database objects such as tables and forms.

For more information about naming conventions in Access, click Microsoft Access Help on the Help menu, type Guidelines for naming fields, controls, and objects in the Office Assistant or the Answer Wizard, and then click Search to view the topic.

There are known problems that occur if you use the following special characters in Access. The following scenarios describe when you must not use the special characters:  When you export the database objects to other file formats such as a Microsoft Excel file format, an HTML file format, or a text file format, do not use a number sign (#) or a period (.) in the database object names or in the field names.

For more information, click the following article number to view the article in the Microsoft Knowledge Base:

308686 Special characters in field names are changed when you export a table to a different file format in Access 2000

 When you use hyperlinks in Access, the hyperlinks are stored as modified Memo fields with a number sign (#) as a delimiter. Therefore, the number sign is regarded as a reserved word in Access. Do not use the number sign when you create hyperlinks.

For more information, click the following article number to view the article in the Microsoft Knowledge Base:

162855 Cannot hyperlink to documents that have &quot;#&quot; in the name in Access 97

 When you import a text file into Access and that text file contains tabs or other special characters, the special characters are converted, and then the special characters appear as boxes. Therefore, when you try to use the imported table, you receive unexpected errors. You must not use the special characters in the source table when you import into Access.

For more information, click the following article number to view the article in the Microsoft Knowledge Base:

210433 Sample function to replace or to remove special characters in an MDB in Access 2000

 When you use ASP forms to add or to modify data in an Access database, you must not use a percent sign (%), a plus sign (+), or a caret (^) in the form. These special characters may not translate correctly in the Access database.

For more information, click the following article number to view the article in the Microsoft Knowledge Base:

163334 How to use percent, plus, and caret symbols in ASP forms in Access 97

 When you use Full-width languages, do not use Full-width characters in the name of database objects or in the name of controls. For example, you must not use Full-width parentheses when you use Full-width languages This may cause compile errors if there is code in an event procedure for the object or for the control.

Additional query words: kbnoOfficeAlertID acc2007 acc97 Access 97 acc2000 Access 2000 acc2002 Access 2002 acc2003 Access 2003

Keywords: kbinfo kbexport kbdatabase kbdesign kbusage KB826763

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.