Results 1 to 3 of 3
  1. #1
    Gold Lounger
    Join Date
    Feb 2004
    Location
    Cape Town, RSA
    Posts
    3,444
    Thanks
    0
    Thanked 1 Time in 1 Post

    Update Hyperlinks to new location! (Access XP)

    Hi,

    This is just a confirmation post to ask if the code supplied by Hans in <post#=286616>post 286616</post#> is the correct type of code to use in my situation. I have a DB table that has hyperlinks that point to files (Word Docs) in a certain dir! The directory system must move to a new drive, and certain sub dirs will be renamed. My question is: Will this code (with a bit of tweaking), be correct to use to re-direct the hyperlinks!

    The dir system is currently on C: . The entire Dir system must now move to the new partitioned D: drive. Then some sub folders will be slightly renamed, eg a sub dir will rename from KL-WD to MX-WD and KL-ES to MX-ES... etc

    Besides the Path in the variables that I must change...is there anything else I need to do to the code? What about table and field names, and do I put the code on a standard module ? as I see this code is attached to a command button!

    The DB is called "Maxima TC"
    The table that has the hyperlinks is called "CurrentCourses"
    The field in which the hyperlinks reside is called "CourseLink"

    TIA
    Regards,
    Rudi

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

    Re: Update Hyperlinks to new location! (Access XP)

    The code in the post you refer to is On Click code for a command button, but you can make it a procedure (sub) in a standard module if you prefer. The code uses DAO, so you must set a reference to the Microsoft DAO 3.6 Object Library in Tools | References...
    Replace "Documents" (the name of the table) with "CurrentCourses".
    Replace [Document Link] (the name of the field) with CourseLink (since your field name doesn't contain a space, the square brackets are not needed, although they wouldn't hurt either)
    Modify the strOld1, strOld2 and strNew variables as needed.

  3. #3
    Gold Lounger
    Join Date
    Feb 2004
    Location
    Cape Town, RSA
    Posts
    3,444
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Update Hyperlinks to new location! (Access XP)

    Thanx for the confirmation Hans...and BTW...thanx for the original code too...this is gonna make life just that much easier in the next couple of days!
    Chow! (as Sal1 would say!) <img src=/S/grin.gif border=0 alt=grin width=15 height=15>
    Regards,
    Rudi

Posting Permissions

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