Results 1 to 11 of 11
  1. #1
    5 Star Lounger
    Join Date
    Mar 2004
    Posts
    924
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Help with changing path names in hyperlink (200)

    Our server has just been swaped over and l cannot find a way of changing path names (these are in hyperlink data type format)
    What l would like to do is to replace the words PANTHER with LEOPARD. I have tried to change the data type to text but this did not work.
    Any help would be appreciated.

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

    Re: Help with changing path names in hyperlink (200)

    I haven't heard of Access 200. Is it Access 2000, 2002 (XP) or 2003?

  3. #3
    5 Star Lounger
    Join Date
    Mar 2004
    Posts
    924
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Help with changing path names in hyperlink (20

    my mistake access 2000

  4. #4
    5 Star Lounger
    Join Date
    Mar 2004
    Posts
    924
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Help with changing path names in hyperlink (20

    i have managed to changed the paths by replacing the hyperlink to text format, but for some odd reason the end of the hyperlink has been chopped and the link is invalid.
    see screenshot for what l mean.

  5. #5
    5 Star Lounger
    Join Date
    Mar 2004
    Posts
    924
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Help with changing path names in hyperlink (20

    Shall l send you a zipped up version of the database?
    Once l know how it can be done with one table and l can do the rest.

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

    Re: Help with changing path names in hyperlink (20

    1) Activate the Modules section of the database window.
    2) Click New.
    3) Copy the following code into the module window:
    <code>
    Function MyReplace(varText As Variant, Find As String, What As String) As Variant
    If IsNull(varText) Then
    MyReplace = Null
    Else
    MyReplace = Replace(varText, Find, What)
    End If
    End Function
    </code>
    4) Switch back to Access.
    5) Activate the Queries section of the database window.
    6) Create a new query in design view.
    7) Add the table with the hyperlink field to the query.
    8) Add the Hyperlink field to the query grid.
    9) Select Query | Update Query; this adds a row 'Update to' in the query window.
    10) Enter the following expression under Hyperlink in the 'Update to' row:
    <code>
    MyReplace([Hyperlink],"PANTHER","LEOPARD")
    </code>
    11) Select Query | Run.
    12) You should see a message that you are about to update ... rows. Click Yes.

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

    Re: Help with changing path names in hyperlink (20

    See my previous reply for a way to update the hyperlink field through a query.

    You shouldn't change a hyperlink field to a text field, the values will be truncated to the length of the text field, with a maximum of 255 characters. You can, however, change it to a Memo field, then replace PANTHER with LEOPARD, and finally change it back to a Hyperlink field.

  8. #8
    5 Star Lounger
    Join Date
    Mar 2004
    Posts
    924
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Help with changing path names in hyperlink (20

    Thats brilliant Hans,

    This will save me an awful lot of time.
    I get an error message, see attachment.

  9. #9
    5 Star Lounger
    Join Date
    Mar 2004
    Posts
    924
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Help with changing path names in hyperlink (20

    I will try this way if l cannot get the query to work.

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

    Re: Help with changing path names in hyperlink (20

    Specify the name of the table in the expressions, e.g.

    MyReplace([Beoing DRLs subtable].[Hyperlink],"PANTHER","LEOPARD")

  11. #11
    5 Star Lounger
    Join Date
    Mar 2004
    Posts
    924
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Help with changing path names in hyperlink (20

    That works great thanks.
    You saved me a lot of time , l really appreciate that help.

Posting Permissions

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