Adding base address to hyperlinks

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • robertoathome
    New Member
    • Mar 2007
    • 20

    Adding base address to hyperlinks

    Hi all. Just when I thought I was finished I realized that my table, in the hyperlink field, doesn't have the base address in each link. E.g.

    I have:
    040F-CY181824-MS.JPG
    where it should be
    T:\SHARED FILES\Administr ation\Masters and Molds Photos\040F-CY181824-MS.JPG

    Since I have over 2000 records I tried to use the below update query but it only updates the "text to display" field and not the acutall "Address". It's supposed to do both.

    Can some1 tell me what I'm missing?

    Left([HyperLinkField],InStr([HyperLinkField],"#")+56) & [Photo] & "#" & Left([HyperLinkField],InStr([HyperLinkField],"#")+56) & [Photo]

    56 is the number of characters of the base address. If I leave 1 it only puts the " T " into the address.

    Thanks!
  • MMcCarthy
    Recognized Expert MVP
    • Aug 2006
    • 14387

    #2
    Originally posted by robertoathome
    Hi all. Just when I thought I was finished I realized that my table, in the hyperlink field, doesn't have the base address in each link. E.g.

    I have:
    040F-CY181824-MS.JPG
    where it should be
    T:\SHARED FILES\Administr ation\Masters and Molds Photos\040F-CY181824-MS.JPG

    Since I have over 2000 records I tried to use the below update query but it only updates the "text to display" field and not the acutall "Address". It's supposed to do both.

    Can some1 tell me what I'm missing?

    Left([HyperLinkField],InStr([HyperLinkField],"#")+56) & [Photo] & "#" & Left([HyperLinkField],InStr([HyperLinkField],"#")+56) & [Photo]

    56 is the number of characters of the base address. If I leave 1 it only puts the " T " into the address.

    Thanks!
    What is the full hyperlink value in the [HyperLinkField] can you give an example.

    Comment

    • robertoathome
      New Member
      • Mar 2007
      • 20

      #3
      Originally posted by mmccarthy
      What is the full hyperlink value in the [HyperLinkField] can you give an example.
      Yeah, I put it in the original post. One of the record is supposed to have:

      T:\SHARED FILES\Administr ation\Masters and Molds Photos\040F-CY181824-MS.JPG

      But now I only have:
      040F-CY181824-MS.JPG

      Thanks!

      Comment

      • MMcCarthy
        Recognized Expert MVP
        • Aug 2006
        • 14387

        #4
        Originally posted by robertoathome
        Yeah, I put it in the original post. One of the record is supposed to have:

        T:\SHARED FILES\Administr ation\Masters and Molds Photos\040F-CY181824-MS.JPG

        But now I only have:
        040F-CY181824-MS.JPG

        Thanks!
        Where does the "#" come in?

        Comment

        • robertoathome
          New Member
          • Mar 2007
          • 20

          #5
          Originally posted by mmccarthy
          Where does the "#" come in?
          From what I learned the Hyperlink is made of at least 3 fields separated by # .
          The first is the "text to display" the second the acutal address.

          Comment

          • MMcCarthy
            Recognized Expert MVP
            • Aug 2006
            • 14387

            #6
            Originally posted by robertoathome
            From what I learned the Hyperlink is made of at least 3 fields separated by # .
            The first is the "text to display" the second the acutal address.
            The problem is that the update cannot see that it can only see the displayed text.

            Comment

            • MMcCarthy
              Recognized Expert MVP
              • Aug 2006
              • 14387

              #7
              Originally posted by mmccarthy
              The problem is that the update cannot see that it can only see the displayed text.
              If "T:\SHARED FILES\Administr ation\Masters and Molds Photos\" is the location of all of these files then


              Code:
              SET [Photo]="T:\SHARED FILES\Administration\Masters and Molds Photos\" & [Photo]
              Should do what you want.

              Comment

              • robertoathome
                New Member
                • Mar 2007
                • 20

                #8
                Originally posted by mmccarthy
                If "T:\SHARED FILES\Administr ation\Masters and Molds Photos\" is the location of all of these files then


                Code:
                SET [Photo]="T:\SHARED FILES\Administration\Masters and Molds Photos\" & [Photo]
                Should do what you want.
                I don't know how but it put just a ' 0 ' in the text to display and deleted the original link in the "address" field.

                Comment

                • MMcCarthy
                  Recognized Expert MVP
                  • Aug 2006
                  • 14387

                  #9
                  Originally posted by robertoathome
                  I don't know how but it put just a ' 0 ' in the text to display and deleted the original link in the "address" field.
                  I don't know how either.

                  Did you back up the table/database?

                  If so try this ...

                  Create a new field called Photo2

                  Set [Photo2] = "As before"

                  Comment

                  Working...