Results 1 to 6 of 6
  1. #1
    Bronze Lounger
    Join Date
    Jan 2001
    Location
    Virginia, USA
    Posts
    1,560
    Thanks
    37
    Thanked 1 Time in 1 Post

    Hyperlink to wrong place (2003)

    My problem concerns e-mailing from Access, but the specific problem I'm having is with the target of the hyperlinks. I see there are plenty of threads dealing with e-mail, and I'll have to study them when I get to that point. The immediate problem is that the hyperlinks (e-mail addresses) that display in my database point to the wrong target, and I've no idea how to fix the problem. I created the e-dresses in the table in two ways: I typed them manually, or I copied and pasted them from their home location in the Outlook address book.

    When I mouse-over the e-dress in a form, it pops up in one of two variations: (1) http://adam.smith@somewhere.nowhere.net; or (2) it points to the file location of an MS-Word document (cocuments and Settings... etc.) and ends with "mailto:adam.smith". The first variation just gets me an error message; the second launches MS-Word and the document and lands on the correct hyperlink. Clicking on the link in the Word document launches a new Outlook e-mail message with the e-dress already in place.

    I won't fret for now over e-mailing to everyone in the table. I'd just like to be able to click on the link in a form and launch an e-mail message form. How do I fix the hyperlink issue?

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

    Re: Hyperlink to wrong place (2003)

    The first type can be repaired using an update query:
    - Create a new query in design view, based on the table.
    - Add the e-mail field to the query grid. Let's say it is called EMail.
    - Select Query | Update Query.
    - In the Update to line, enter
    <code>
    Replace([EMail],"http://","mailto:")
    </code>
    - Select Query | Run and confirm.

    Whether the second type is easy to repair depends: if it is always the same Word document, you can try running a second update query that replaces "file:///" followed by the full path of the Word document with an empty string "". But if there are different documents, it becomes more difficult.

  3. #3
    Bronze Lounger
    Join Date
    Jan 2001
    Location
    Virginia, USA
    Posts
    1,560
    Thanks
    37
    Thanked 1 Time in 1 Post

    Re: Hyperlink to wrong place (2003)

    It appears the link goes to the same document every time. If I understand your message, I'm going to run an update query to replace the path that leads to the Word document with an empty string. So I'm going to leave in place the part that reads, "mailto: ~". Is that correct?

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

    Re: Hyperlink to wrong place (2003)

    Yes, that's right.

  5. #5
    Bronze Lounger
    Join Date
    Jan 2001
    Location
    Virginia, USA
    Posts
    1,560
    Thanks
    37
    Thanked 1 Time in 1 Post

    Re: Hyperlink to wrong place (2003)

    Never mind, Hans

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

    Re: Hyperlink to wrong place (2003)

    Access doesn't have a separate field type for e-mail addresses.
    You can use a plain text field and use some code to send mail to the address in the text field, or you can use a hyperlink field. If you simply enter an e-mail address in a hyperlink field, Access interprets it as a web address (hence the http://), but if you right-click the field (or text box bound to the field) and select Edit Hyperlink from the popup menu, you can specify that the contents will be an e-mail address.

Posting Permissions

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