Results 1 to 4 of 4
  1. #1
    Join Date
    Oct 2020
    Posts
    2

    Hypertext link at wrong address

    I had to replace my HD and with a new address to my Access Base.
    I have 30,000 records in the table and 4 fields in each of them who must directly open a Pdf file for each or Html for some on the Web.
    I did change the name on the fields of each records to new name (witch is the Address to follow) with VBA (SQLString = Update ..... ) but the link is still on the old Address
    How can I replace the HyperlinkPart([Field], 0) value for HyperlinkPart([Field], 2) Value
    I did try a lot of way without any success


    30,000 fields X 4 fields is to long for an answer, I can use VBA to do so
    Thanks
    Yves

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,902
    What was the exact SQL statement? A Replace() operation should work.

    UPDATE tablename SET fieldname = Replace(fieldname, 'oldpath', 'newpath')

    Post your procedure code.

    I NEVER use Hyperlink type field.
    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
    Join Date
    Oct 2020
    Posts
    2
    sqlstring = "UPDATE plus10000 SET plus10000.[Lien Ordi1] = Right([plus10000]![Lien Ordi],Len([plus10000]![Lien Ordi])-12);"
    DoCmd.RunSQL sqlstring


    vnom = "C:/users/yvesm"
    sqlstring2 = "UPDATE plus10000 SET plus10000.[LienPrinc] ='"
    sqlstring2 = sqlstring2 + vnom
    sqlstring2 = sqlstring2 + "' + ([plus10000]![Lien Ordi1])"
    DoCmd

    Thanks

  4. #4
    June7's Avatar
    June7 is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,902
    Did you try Replace() as suggested?

    What do you mean by "did change the name on the fields of each record"? What field - the Hyperlink field?
    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.

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

Similar Threads

  1. Using hypertext links in database design.
    By snowboarder234 in forum Database Design
    Replies: 2
    Last Post: 05-18-2016, 07:00 PM
  2. Replies: 7
    Last Post: 10-06-2015, 10:27 AM
  3. Replies: 3
    Last Post: 04-16-2014, 06:03 PM
  4. Replies: 4
    Last Post: 01-13-2013, 02:40 AM
  5. Replies: 8
    Last Post: 11-10-2012, 03:03 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