Microsoft KB Archive/162855

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

Article ID: 162855

Article Last Modified on 1/19/2007

-

APPLIES TO


 * Microsoft Access 97 Standard Edition

-



This article was previously published under Q162855



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



SYMPTOMS
If you include the number sign (#) character in a hyperlink file name, you may receive the following error message:

Unable to open. Cannot open the specified file.

 -or-

The Windows Explorer will open the folder where the file is located.



CAUSE
Because hyperlinks in Microsoft Access are stored as modified Memo fields with the number sign (#) character as a delimiter, it is essentially a reserved character for hyperlinks.



RESOLUTION
Do not use the number sign (#) character in hyperlink file names.



Hyperlink on a Form
 Save a text file on the Desktop with the name #test.txt . In Microsoft Access, create a form not based on any table or query in Design view. Insert a hyperlink. In the Link To file or URL box, locate and select the #test.txt file on the Desktop. Click OK twice. Change the form to Form view.</li> Click the hyperlink. Note that you receive the following error message:

Unable to open test.txt. Cannot open the specified file.

Note that the number sign (#) is missing from the file name, and that the file does not open.</li></ol>

Hyperlink in a Table

 * 1) Save a text file on the Desktop with the name #test.txt.
 * 2) Create a table with a field named Hlink with a Hyperlink data type. Save the table as Table1.
 * 3) Open the Table1 table in Datasheet view. In the Hlink field, insert a hyperlink.
 * 4) In the Link To file or URL box, locate and select the #test.txt file on the Desktop. Click OK twice.
 * 5) Click the hyperlink. Note that Windows Explorer brings up the folder where the file is located, but does not open it.

NOTE: The same result will occur if you manually type the Hyperlink, instead of browsing to and selecting the file.

<div class="references_section">