Results 1 to 5 of 5
  1. #1
    4 Star Lounger
    Join Date
    Nov 2002
    Location
    London, Gtr London, England
    Posts
    496
    Thanks
    8
    Thanked 0 Times in 0 Posts

    Inserting a hyperlink with a query (2003 SP2)

    Dear Loungers,

    I have a table with a hyperlink field. the file that this will link to is a known folder and a filename based on the record Id. We used a query to populate the records. Although the data in the filed looks OK if I check on edit hyperlink the label is populated with the value set by the query, however the address is not. Can a query set the address of a hyperlink?

    thank you................... liz

  2. #2
    5 Star Lounger
    Join Date
    Jan 2001
    Location
    Warrington, Cheshire, England
    Posts
    712
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Inserting a hyperlink with a query (2003 SP2)

    Not sure if your problem is exactly as mine was, but I had problems with manipulating hyperlinks, too. Thanks to Hans, I now know :
    The actual contents of a hyperlink field look like this:

    displaytext#address#subaddress

    where the displaytext and subaddress can be empty. When you look at a hyperlink field, Access will show the displaytext, or if that is empty, the address. It hides the actual contents.

    If you tab into the field and use function key F2, it will show exactly what's stored in the field. It is this whole string that has to be manipulated.
    Hans' answer can be found here
    Hope this helps
    Silverback
    Silverback

  3. #3
    5 Star Lounger
    Join Date
    Jan 2001
    Location
    Warrington, Cheshire, England
    Posts
    712
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Inserting a hyperlink with a query (2003 SP2)

    PS : More info in Access help by typing hyperlink , then going to About Hyperlinks and then Parts of a hyperlink address .
    Silverback
    Silverback

  4. #4
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Inserting a hyperlink with a query (2003 SP2)

    A hyperlink field is in fact a memo field that stores data in the following form:

    displaytext#address#subaddress

    The middle part is the hyperlink address; if you omit the first part, the hyperlink address is used as display text. The third part (subaddress) is only used to specify a bookmark within a document or something similar.

    So you can use an expression like the following in your query:

    "#C:TestFile" & [RecordID] & "#"

    where C:Test is the path, and the file name is File followed by the record ID.

  5. #5
    4 Star Lounger
    Join Date
    Nov 2002
    Location
    London, Gtr London, England
    Posts
    496
    Thanks
    8
    Thanked 0 Times in 0 Posts

    Re: Inserting a hyperlink with a query (2003 SP2)

    many thanks Silverback & Hans, now understand and all works!

    liz

Posting Permissions

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