Results 1 to 9 of 9
  1. #1
    Star Lounger
    Join Date
    Mar 2004
    Location
    Essex, England
    Posts
    93
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Hyperlinks (2000)

    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 <File> and <Database properties>, but I did this, and it has had no effect.

    Could i be missing something obvious?

    Thanks


    Robert

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

    Re: Hyperlinks (2000)

    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.

  3. #3
    Star Lounger
    Join Date
    Mar 2004
    Location
    Essex, England
    Posts
    93
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Hyperlinks (2000)

    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

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

    Re: Hyperlinks (2000)

    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.

  5. #5
    2 Star Lounger
    Join Date
    Mar 2001
    Location
    Emerald Beach, New South Wales, Australia
    Posts
    126
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Hyperlinks (2000)

    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.

  6. #6
    Star Lounger
    Join Date
    Mar 2004
    Location
    Essex, England
    Posts
    93
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Hyperlinks (2000)

    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

  7. #7
    3 Star Lounger
    Join Date
    Jun 2001
    Location
    Salem, Oregon, USA
    Posts
    219
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Hyperlinks (2000)

    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! <gg>) 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

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

    Re: Hyperlinks (2000)

    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 ...?

  9. #9
    3 Star Lounger
    Join Date
    Jun 2001
    Location
    Salem, Oregon, USA
    Posts
    219
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Hyperlinks (2000)

    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 ... <gg>). 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

Posting Permissions

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