Results 1 to 5 of 5
  1. #1
    Join Date
    Oct 2003
    Location
    Chicago, IL
    Posts
    154

    Unanswered: Hyperlink not populating!

    Well, I looked for ten minutes, no fix found... So now it's up to you guys!

    I have a DB that links to a table and updates a hyperlink field with a filename.

    The update query that is used to update the linked field is as follows:

    Forms![Contract Maintenance Form]![Maintenance Form subform].Form!Location & Forms![Contract Maintenance Form]!Filename & ".pdf"

    I could have sworn it worked before today but now, for some reason, the only thing that happens is that the correct field/record in the linked table is updated, but it only populates the "Text to Display" field, not the hyperlink address!! so, for example, the field may read (correctly):

    \\server1\share1\contract\track1.pdf

    but when i click on it nothing happens!

    if i go into the linked table, browse to and right click on the updated field, choose "hyperlink">"edit hyperlink", copy n paste the "Text to display" data into the "address" part of the properties for this window, it then works!

    To summarize, how do i ensure that my update query expression populates the hyperlink portion of the field, not just the 'text to display' portion?

    tanks berry mooshu

  2. #2
    Join Date
    Sep 2004
    Location
    Reston, VA
    Posts
    86
    A Hyperlink field actually consists of four parts:

    displaytext#address#subaddress#screentip

    If you move the cursor onto a hyperlink cell in your table and press F2, you can see the actual value of the cell (usually you just have the display text, or the address if there is no display text)

    So #C:\# would display as C:\

    Whereas CDrive#C:\# would display as CDrive - yet both would link to the same place.

    So in your update query, you need to use this as the value you are updating to:

    Forms![Contract Maintenance Form]![Maintenance Form subform].Form!Location & Forms![Contract Maintenance Form]!Filename & ".pdf#" & _
    Forms![Contract Maintenance Form]![Maintenance Form subform].Form!Location & Forms![Contract Maintenance Form]!Filename & ".pdf#"

    Or you can change the first part (display text) to something more managable if you like:

    "Track1.pdf#" & Forms![Contract Maintenance Form]![Maintenance Form subform].Form!Location & Forms![Contract Maintenance Form]!Filename & ".pdf#"

    That should work.

  3. #3
    Join Date
    Oct 2003
    Location
    Chicago, IL
    Posts
    154
    Fantastic info, I think I'm halfway there... Thanks, BummerJeff!

    With that change, the display text is still accurate, but the hyperlink address shows up in the hyperlink properties as:

    Forms![Contract Maintenance Form]![Maintenance Form subform].Form!LocationTrack1.pdf

    Apparently, the # symbol causes access to not reference the indicated fields... Any ideas?
    Last edited by jimmyswinger; 10-19-04 at 19:48.

  4. #4
    Join Date
    Sep 2004
    Location
    Reston, VA
    Posts
    86
    No problem. Make sure the # symbol is inside the quotes and that you don't have the

    Forms![Contract Maintenance Form]![Maintenance Form subform].Form!Location

    part of the hyperlink address surrounded by quotes, which looks like the problem, since

    Forms![Contract Maintenance Form]!Filename

    appears as "Track1", while the other doesn't.

    Or try changing the subform reference to this, since Access defaults to the Form property anyways:

    Forms![Contract Maintenance Form]![Maintenance Form subform]![Location]
    Last edited by BummerJeff; 10-19-04 at 20:52.

  5. #5
    Join Date
    Oct 2003
    Location
    Chicago, IL
    Posts
    154

    Thumbs up Ba da bing!

    Works perfectly! Your suggestion was dead on!

    Here is the resulting update query:

    Forms![Contract Maintenance Form]![Maintenance Form subform].Form!Location & Forms![Contract Maintenance Form]!Filename & ".pdf#" & Forms![Contract Maintenance Form]![Maintenance Form subform].Form!Location & Forms![Contract Maintenance Form]!Filename & ".pdf#"

    Muchos graciolas

Posting Permissions

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