ACC2000: Cannot Hyperlink to Documents with # in the Name (207852)



The information in this article applies to:

  • Microsoft Access 2000

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

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.

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.

RESOLUTION

Do not use the # character in hyperlink file names.

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.

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.

Modification Type:MajorLast Reviewed:6/24/2004
Keywords:kberrmsg kbother kbprb KB207852