Results 1 to 4 of 4
  1. #1
    tcheck is offline Competent Performer
    Windows 7 Access 2007
    Join Date
    Nov 2010
    Posts
    131

    Run Time Error 7971

    I created a Hyperlink field in an access table that links back to a PDF file on the server. When I show the field in the form and click on it it works fine. When I create a botton with the command of

    Application.FollowHyperlink Me!ReportLink

    I get an error that states;

    Run-Time error '7971':
    Microsoft Access can't follow the hyperlink to
    '#\\Servername\directory\filename.pdf#'

    When I convert the link from a hyperlink to a text field and get rid of the # in the field, I am unable to open the file at all.



    Thanks for your advice in advance.

  2. #2
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,641
    Personally I use a plain text field, and this code works perfectly:

    Application.FollowHyperlink Me.txtAttachment

    where the field contains a path like yours.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    tcheck is offline Competent Performer
    Windows 7 Access 2007
    Join Date
    Nov 2010
    Posts
    131
    I just re-ran the form and now the link does work with a plain text field.

    Is there a way to have a button on a Hyperlink field type?

  4. #4
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,641
    I'm not sure; I've never used that data type. If I want the user to be able to click on it, I put the code above in the click or double click event of the textbox.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Error in Run Time
    By dongodu in forum Queries
    Replies: 5
    Last Post: 07-24-2011, 06:54 PM
  2. Replies: 2
    Last Post: 12-23-2010, 09:11 AM
  3. Replies: 2
    Last Post: 12-02-2010, 02:35 AM
  4. Run time error
    By vaikz in forum Import/Export Data
    Replies: 1
    Last Post: 02-18-2010, 11:37 PM
  5. Run Time Error 424
    By ddog171 in forum Programming
    Replies: 3
    Last Post: 02-04-2006, 07:13 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums