• Hyperlinks (2000)

    Author
    Topic
    #407253

    I have a table that includes ‘surnames’. I want to set this field as a hyperlink, so that I can generate a report for export to the web.
    However, if say, I the surname “Smith” into the field, the hyperlink becomes “http:/Smith”. I want to be able to type “smith” and for the field to pick up the full path ( eg “//path/surnames/smith” )

    I thought this was achieved by changing the hyperlink base in and , but I did this, and it has had no effect.

    Could i be missing something obvious?

    Thanks

    Robert

    Viewing 2 reply threads
    Author
    Replies
    • #850436

      What do you want to link to? Is “//path/surnames/smith” a file? If so, Access doesn’t recognize it as a file since it has no extension.

      • #850443

        The extension will be “htm”.
        My report will contain the list of Surnames (as hyperlinks). Therefore, when a user clicks on the hyperlink that reads “Smith”, they will go to the file “//path/surnames/smith.htm”

        At the moment, if you type “Smith” into my tbl Surnames (formatted as ‘hyperlink’) the hyperlink is simply set as “http:/smith” on the report I need to include the full path, but I do not want to enter the full path in the surname field of the table.

        Thanks

        Robert

        • #850447

          I don’t think what you want can be done in a table, unless you are prepared to append .htm to all entries. Access will recognize them as file names then. So you would have to enter Smith.htm, Jones.htm etc.

        • #850449

          I don’t think what you want can be done in a table, unless you are prepared to append .htm to all entries. Access will recognize them as file names then. So you would have to enter Smith.htm, Jones.htm etc.

        • #850946

          you could always build the path in the after update event of the field and assign it to another field on the form for the user to click on.

          assuming your surname field is called txtSurname
          create a new edit control called txtxSurnameLink and set the is hyperlink property to true.
          in the after updae event for txtSurname

          do some thing like this
          Me.txtSurnameLink = “pathsurname” & Me.txtSurname & “.htm”

          in your report you could do the same thing for display.

          As far as I know you can’t use a hyperlink in a report except for dipsplay as there is no way of retrieving the click on the link from a report canvas.

          • #852101

            Thanks for the help, Hans and Stewart. After Hans’ reply, I thought along the same lines as Stewart.
            So, looks like I’ll be going that road!

            Regards

            Robert

          • #852102

            Thanks for the help, Hans and Stewart. After Hans’ reply, I thought along the same lines as Stewart.
            So, looks like I’ll be going that road!

            Regards

            Robert

        • #850947

          you could always build the path in the after update event of the field and assign it to another field on the form for the user to click on.

          assuming your surname field is called txtSurname
          create a new edit control called txtxSurnameLink and set the is hyperlink property to true.
          in the after updae event for txtSurname

          do some thing like this
          Me.txtSurnameLink = “pathsurname” & Me.txtSurname & “.htm”

          in your report you could do the same thing for display.

          As far as I know you can’t use a hyperlink in a report except for dipsplay as there is no way of retrieving the click on the link from a report canvas.

      • #850444

        The extension will be “htm”.
        My report will contain the list of Surnames (as hyperlinks). Therefore, when a user clicks on the hyperlink that reads “Smith”, they will go to the file “//path/surnames/smith.htm”

        At the moment, if you type “Smith” into my tbl Surnames (formatted as ‘hyperlink’) the hyperlink is simply set as “http:/smith” on the report I need to include the full path, but I do not want to enter the full path in the surname field of the table.

        Thanks

        Robert

    • #850437

      What do you want to link to? Is “//path/surnames/smith” a file? If so, Access doesn’t recognize it as a file since it has no extension.

    • #964335

      Hello,
      I know this question was “so” last-year for you, but, I wanted you to know that I was experiencing the same problem in Access 2K — from my testing, and I _think_ I’ve done everything right, I cannot get the “hyperlink base” to work.
      My testing involved putting the whole link in the field, and it works, and then trying to split it into base and just the file name (with extension, Hans! ) and closing & reopening the database in case that makes a difference (it sometimes does). Has anyone else had problems with the “hyperlink base” feature, or success? — thx
      Pat

      • #964337

        How exactly are you trying to use the hyperlinks, and what exactly is the problem – do you get an error message, or does nothing happen at all, or …?

        • #964338

          Well, Hans, after getting your email, I then tried it over and over again many different ways. My initial error was not realizing that pound signs might be required (er … ). So, then I tried it many different ways — pound signs or not, trailing folder slash signs, and, suddenly, it worked! The secret is this:

          If you want to open file “MyMainServerPrimaryFolderSecondaryFolderpatsTest.txt,”
          make the following the hyperlink base (but do not put any quotes or pound signs around it):
          “MyMainServerPrimaryFolderSecondaryFolder” (include the trailing slash).

          (I closed, reopened the database after creating the hyperlink base, that maybe unnecessary voodoo, but sometimes those settings don’t go into effect until the next time you open the database.)

          Then, I typed “#patsTest.txt#” (no quotes, but yes # sign) into the hyperlink field. Then I move off the record, came back and clicked it, and it worked.

          The error message I was getting was “Unable to open http://patsTest.txt. Cannot locate the Internet server or proxy server.” I also got an “unable to open file” during a few of the iterations.

          Well, thanks for making me go back! Perhaps it would all have been a breeze if I had just surrounded the initial patsTest.txt with the pound sign, that is all.

          thx
          Pat

    Viewing 2 reply threads
    Reply To: Hyperlinks (2000)

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: