Microsoft Knowledge Base Email Alertz

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

Search KbAlertz

Advanced Search

Receive Microsoft Knowledge Base articles by E-Mail?

Every night we scan the Microsoft Knowledge Base. If technologies you're interested in are updated, we'll send you an e-mail. You only get one e-mail a day, and only when new articles are added.

Click here to create a
FREE account
Already have an account?
[Click here to Login]











Microsoft Knowledge Base Article

This article contents is Microsoft Copyrighted material.
©2005-©2007 Microsoft Corporation. All rights reserved. Terms of Use | Trademarks

Article ID: 207852 - Last Review: June 24, 2004 - Revision: 2.0

ACC2000: Cannot Hyperlink to Documents with # in the Name

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

On This Page

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.

APPLIES TO
  • Microsoft Access 2000 Standard Edition
Keywords: 
kberrmsg kbother kbprb KB207852
       

Community Feedback System

Very often, it takes hours to solve a problem. Very often, you've looked high and low, and have tried a lot of solutions. When you finally found it, chances are, it was because someone else helped you. Here's your chance to give back. Use our community feedback tool to let others know what worked for you and what didn't.

Please also understand that the community feedback system is not warranted to be correct, it's simply a system that we've built to let people try and help each other. If something in a feedback response doesn't make sense to you, or you're not comfortable making changes that the feedback talks about (like registry edits), please consult a professional.

Thank you for using kbAlertz.com Feedback System.

-- Scott Cate

Anonymous User Reported as Irrelevant  
Written: 10/20/2004 12:33 AM
i have windows xp and i cant open any hyperlinks given in any mail account