Results 1 to 6 of 6
  1. #1
    d-mcc56 is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Nov 2014
    Posts
    16

    Update Query to Change Names of Hyperlinks

    Hey all,

    So I have a table with 2 fields.
    The first field has the addresses to multiple hyperlink paths to folders on my computer.
    In this field the display text matches the hyperlink paths.
    In the second field I have the desired display text for field 1.
    I have tried using an update query to either:

    1) Change the display texts of field 1 to match field 2 while preserving the hyperlink path


    2) Add the hyperlink path from field 1 to field 2 without altering the display name.

    I cannot get either one to work. Upon updating field 1, I lose the path, and upon updating field 2, I lose the name.
    Can anyone help me out?

    Thanks!

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,816
    Does every hyperlink have all 3 parts? If you don't know what that means, review http://www.allenbrowne.com/casu-09.html

    Will need to use string manipulation to extract the parts and concatenate what you want to retain with the new part.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    d-mcc56 is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Nov 2014
    Posts
    16
    I believe it has all three parts?
    An example of a path in field1 is:
    \\CEPFSV01\TSDATA\Planning\Development_Planning_En gineering\Development_Engineering\4) CONSTRUCTION\Commercial Projects\MIA's\E2012's\E12.01_DA65178149_Aurora~S1 \
    And what I want to display is just the E12.01 (which is in the same record under field2 of my table).

    Hmm string manipulation is foreign to me, I'll look into it, thanks.

  4. #4
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,816
    That is not a complete hyperlink as described by Allen's article.

    If you already have the value for display in Field2, then all should have to do is concatenate. However, I am trying this and not getting the concatenated string to work.

    Possible option is to show Field2 in textbox formatted to display like hyperlink but code uses Field1.

    Review another Allen article: http://allenbrowne.com/func-GoHyperlink.html
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  5. #5
    Neil Bingham is offline Novice
    Windows 10 Access 2010 64bit
    Join Date
    Feb 2009
    Location
    Cumbria UK
    Posts
    14
    Using a query to update a Hyperlink field does not work it only updates what is shown in the field but NOT the underlying link - so try this instead - use find and replace to amend the field. This apparently changes the displayed file name AND the underlying link. You can bulk amend file paths also in the same way with a little ingenuity.

  6. #6
    isladogs's Avatar
    isladogs is offline MVP / VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jan 2014
    Location
    Somerset, UK
    Posts
    5,954
    Another very similar thread here: https://www.accessforums.net/showthread.php?t=56543
    Might be worth comparing answers on each

    Suggest you use text datatype rather than hyperlink datatype
    Colin, Access MVP, Website, email
    The more I learn, the more I know I don't know. When I don't know, I keep quiet!
    If I don't know that I don't know, I don't know whether to answer

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

Similar Threads

  1. Replies: 3
    Last Post: 01-24-2014, 03:33 PM
  2. Replies: 2
    Last Post: 11-29-2013, 12:13 PM
  3. Help using update query to change dates
    By goingcrosseyed in forum Queries
    Replies: 1
    Last Post: 12-03-2012, 07:17 AM
  4. Change Excel Sheet Names
    By qwerty1 in forum Access
    Replies: 4
    Last Post: 06-12-2012, 09:53 AM
  5. Batch change hyperlinks to images
    By amer in forum Access
    Replies: 2
    Last Post: 06-09-2010, 06:56 AM

Tags for this Thread

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