Special characters that you must avoid when you work with Access databases (826763)



The information in this article applies to:

  • Microsoft Office Access 2003
  • Microsoft Access 2002
  • Microsoft Access 2000
  • Microsoft Access 97

This article applies to a Microsoft Access database (.mdb) and a Microsoft Access project (.adp).

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 double quotation (") mark 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:
Space
Double quotation mark"
Apostrophe'
Accent grave`
Number sign#
Percent sign%
Greater than>
Less than<
Exclamation mark !
Period.
Brackets[ or ]
Asterisk*
Dollar$
Semicolon;
Colon:
Question mark?
Caret^
Braces( or )
Plus sign+
Backslash\

Access Naming Conventions

Microsoft recommends that you do not use a period (.), an exclamation mark (!), an accent grave (`), a bracket ([ ]), a space ( ), or a double quotation mark (") 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 additional information, click the following article number to view the article in the Microsoft Knowledge Base:

    308686 ACC2000: Special Characters in Field Names Are Changed When You Export a Table to a Different File Format

  • When you use hyperlinks in Access, the hylerlinks 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 additional information, click the following article number to view the article in the Microsoft Knowledge Base:

    162855 ACC97: Cannot Hyperlink to Documents with "#" in the Name

  • 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 additional information, click the following article number to view the article in the Microsoft Knowledge Base:

    210433 ACC2000: Sample Function to Replace or to Remove Special Characters in an MDB

  • 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 additional information, click the following article number to view the article in the Microsoft Knowledge Base:

    163334 ACC97: How to Use Percent, Plus, and Caret Symbols in ASP Forms

  • 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.

Modification Type:MinorLast Reviewed:6/3/2004
Keywords:kbExport kbdesign kbDatabase kbusage kbinfo KB826763 kbAudDeveloper