Notice: This website is an unofficial Microsoft Knowledge Base (hereinafter KB) archive and is intended to provide a reliable access to deleted content from Microsoft KB. All KB articles are owned by Microsoft Corporation. Read full disclaimer for more details.

ACC2000: Cannot Hyperlink to Documents with # in the Name


View products that this article applies to.

This article was previously published under Q207852
Novice: Requires knowledge of the user interface on single-user computers.

This article applies only to a Microsoft Access database (.mdb).

↑ Back to the top


Symptoms

If you include the number sign (#) character in a hyperlink file name, the hyperlink URL is truncated after the number sign. When you click the hyperlink, you may receive the following error message:
Unable to open <file name>. Cannot open the specified file.
If the number sign is the first character in the file name, the hyperlink is truncated at the end of the file's directory path, and Windows Explorer opens the folder where the file is located.

↑ Back to the top


Cause

Hyperlinks in Microsoft Access are stored as modified Memo fields, with the # character as a delimiter. The # character is essentially a reserved character for hyperlinks.

↑ Back to the top


Resolution

Do not use the # character in hyperlink file names.

↑ Back to the top


More information

Steps to Reproduce Behavior

Hyperlink on a Form

  1. Save a text file as link#hltest.txt on the root directory of your local hard disk (drive C).
  2. Start Microsoft Access, and then open any database.
  3. In the Database window, click Forms under Objects, and then click New.
  4. In the New Form dialog box, click OK without selecting a table or query to base the form on.
  5. On the Insert menu, click Hyperlink.
  6. In the Insert Hyperlink dialog box, under Link to, click Existing File or Web Page. In the Type the file or Web page name box, type C:\link#hltest.txt, and then click OK.
  7. On the View menu, click Form View.
  8. Click the hyperlink. Note that you receive the following error message:
    Unable to open hltest.txt. Cannot open the specified file.
    Note that the first part of the file name up to and including the number sign (#) is missing from the file name, and that the file does not open.

Hyperlink in a Table

  1. Save a text file as #linktest.txt on the root directory of your local hard disk (drive C).
  2. Start Microsoft Access, and then open any database.
  3. In the Database window, click Tables under Objects, and then click New.
  4. In the New Table dialog box, click Design View, and then click OK.
  5. Create a field named Hlink with a Hyperlink data type. Save the table as Table1.
  6. Open Table1 in Datasheet view.
  7. On the Insert menu, click Hyperlink.
  8. In the Insert Hyperlink dialog box, under Link to, click Existing File or Web Page. Under Browse to, click the File button, and then, in the Link to File dialog box, select the #linktest.txt file on drive C. Click OK twice.
  9. In the Table1, click the hyperlink. Note that Windows Explorer opens the folder where the file is located but does not open the file.

↑ Back to the top


References

For more information about hyperlinks, click Microsoft Access Help on the Help menu, type type a hyperlink in a field or text box in the Office Assistant or the Answer Wizard, and then click Search to view the topics returned.

↑ Back to the top


Keywords: KB207852, kbprb, kbother, kberrmsg

↑ Back to the top

Article Info
Article ID : 207852
Revision : 2
Created on : 6/24/2004
Published on : 6/24/2004
Exists online : False
Views : 279