Results 1 to 3 of 3
  1. #1
    Join Date
    May 2003
    Location
    Dallas
    Posts
    817
    Provided Answers: 5

    Unanswered: cannot follow hyperlink error

    I have a combo box that on the after update event I pu together a string for a hyperlink
    i write that string to label caption and then write that string to the subaddress of the label

    the string location is correct because i can click the start button and paste the string there and it will launch the pdf as will the run box (remember that on)

    But when I click the hyperlink on the label I receive the following message:

    mydatabe cannot follow the hyperlink mystring
    Please verify the desination
    the string is valid and here is the code

    Private Sub List344_AfterUpdate()
    Dim strlocation As String
    Dim strfolder As String

    strfolder = DLookup("[userdefinedfield1]", "tblsystemadmin", "cmselement='safety profile'")
    strlocation = strfolder & "\" & List344 & ".pdf"

    lblHyperlink.Caption = strlocation
    lblHyperlink.HyperlinkSubAddress = strlocation

    End Sub


    any help would be so greatly appreciated
    Dale Houston, TX

  2. #2
    Join Date
    Jan 2009
    Location
    Kerala, India
    Posts
    183
    You should write external file reference in the HyperLink Property of the Label control, not in the HyperlinkSubAddress. HyperLinkSubAddress is used for opening internal Objects like Forms, Reports etc.

    Example:

    lblHyperlink.HyperlinkSubAddress = "Form Employees"
    www.MsAccessTips.com (Learn MS-Access Tips & Tricks)
    Learn Advanced MS-Access Programming with sample VBA Code.

    All responses are based on Access 2003/2007

  3. #3
    Join Date
    May 2003
    Location
    Dallas
    Posts
    817
    Provided Answers: 5

    resolved

    yes - ytou are right and that worked
    I also wrote a function to write the address to hidden text box to launch the docs thank you
    Last edited by axsprog; 12-22-12 at 16:09. Reason: correct a spelling error
    Dale Houston, TX

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •