Results 1 to 5 of 5
  1. #1
    Bronze Lounger
    Join Date
    Feb 2001
    Location
    Escondido, California, USA
    Posts
    1,458
    Thanks
    0
    Thanked 1 Time in 1 Post

    Hyperlink Function (WXP Access 2002)

    How do you cause a hyperlink (to a web page or to set up a new email message) to actually go to that link? I have the hyperlinks in my table and I display them on a form. The Hyperlink property is set to "Yes." The fields display on the form as hyperlinks (blue underlined). However, how do you set it up so that clicking on the displayed hyperlink actually goes to that link?

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

    Re: Hyperlink Function (WXP Access 2002)

    The Suppliers table in the Northwind sample database contains a hyperlink field. Can you click on the hyperlinks in the Suppliers form? (Only a few records have a home page filled in, for example #6, Mayumi's)

  3. #3
    Bronze Lounger
    Join Date
    Feb 2001
    Location
    Escondido, California, USA
    Posts
    1,458
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Hyperlink Function (WXP Access 2002)

    Hi Hans,

    I had forgotten to set the field type in the table to hyperlink -- it was just a normal text field. Once I did that then clicking on a web hyperlink took me right to the page.

    However, the email hyperlink will need some work. I think i will have to come up with some way to append "mailto:" in front of the email address. I suppose I could make it a text field and use an on-click event to append "mailto:" to the address. However, I don't know what the code would be to cause it to actually go to the email handler with that address.

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

    Re: Hyperlink Function (WXP Access 2002)

    If you use a hyperlink field, you can enter something like mailto:billg@microsoft.com to make it into an "automatic" e-mail link.

    If you use a standard text field, you can execute FollowHyperlink:

    Application.FollowHyperlink "mailto:" & Me.txtEmail.Text

    Note: if you put this code in the On Click event of a text box, the user will have a hard time editing the e-mail address; it might be better to use double click, or have a command button.

  5. #5
    Bronze Lounger
    Join Date
    Feb 2001
    Location
    Escondido, California, USA
    Posts
    1,458
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Hyperlink Function (WXP Access 2002)

    Thanks Hans,

    I created a separate command button to open an email message. Your code works like a champ!

    Thanks again,

Posting Permissions

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