Results 1 to 14 of 14
  1. #1
    5 Star Lounger bfxtrfcmgr's Avatar
    Join Date
    Aug 2002
    Location
    Fresno, California, USA
    Posts
    995
    Thanks
    12
    Thanked 0 Times in 0 Posts

    Email Hyperlink (2002 SP-2)

    Isn't a txtbx (hyperlink activated) with mailto:somone@somewhere.com supposed to open the default client? (i.e. OL)
    Mine just sits there going. . . <img src=/S/razz.gif border=0 alt=razz width=25 height=17>
    Bryan,
    Not the smartest critter on the glacier. . .
    . . .but I'm persistent (does that count?)

  2. #2
    Gold Lounger
    Join Date
    Feb 2004
    Location
    Cape Town, RSA
    Posts
    3,444
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Email Hyperlink (2002 SP-2)

    What is the datatype of the field. It works if you make it Hyperlink!
    Regards,
    Rudi

  3. #3
    5 Star Lounger bfxtrfcmgr's Avatar
    Join Date
    Aug 2002
    Location
    Fresno, California, USA
    Posts
    995
    Thanks
    12
    Thanked 0 Times in 0 Posts

    Re: Email Hyperlink (2002 SP-2)

    Oh yeah. . .tables. . . <img src=/S/stupidme.gif border=0 alt=stupidme width=30 height=30>
    Thanks Rudi!
    Bryan,
    Not the smartest critter on the glacier. . .
    . . .but I'm persistent (does that count?)

  4. #4
    5 Star Lounger bfxtrfcmgr's Avatar
    Join Date
    Aug 2002
    Location
    Fresno, California, USA
    Posts
    995
    Thanks
    12
    Thanked 0 Times in 0 Posts

    Re: Email Hyperlink (2002 SP-2)

    . . .BTW. . .
    For the data input form I have the default value as "mailto:", but it doesn't help much when you tab into the field if you forget to hit "end" first. Is there a way you know of to have the curser go to the end of the default value?
    Bryan,
    Not the smartest critter on the glacier. . .
    . . .but I'm persistent (does that count?)

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

    Re: Email Hyperlink (2002 SP-2)

    You can use the On Enter (or On Got Focus) event of the text box:

    Private Sub txtEmail_Enter()
    Me.txtEmail.SelStart = Len(Me.txtEmail.Text)
    End Sub

    Substitute the correct name.

  6. #6
    Gold Lounger
    Join Date
    Feb 2004
    Location
    Cape Town, RSA
    Posts
    3,444
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Email Hyperlink (2002 SP-2)

    Thanx Hans,
    I was trying to work out that formula that would be attached to selstart!

    cheers
    Regards,
    Rudi

  7. #7
    5 Star Lounger bfxtrfcmgr's Avatar
    Join Date
    Aug 2002
    Location
    Fresno, California, USA
    Posts
    995
    Thanks
    12
    Thanked 0 Times in 0 Posts

    Re: Email Hyperlink (2002 SP-2)

    <img src=/S/thumbup.gif border=0 alt=thumbup width=15 height=15> . . .perfect!
    I just realized that "mailto:" is going to appear in front of all the email addresses in reports, so I'll need to strip that away again in the report. I'll see what I can do to muck that up first, before I come crying back to the Board.
    <img src=/S/thankyou.gif border=0 alt=thankyou width=40 height=15>
    Bryan,
    Not the smartest critter on the glacier. . .
    . . .but I'm persistent (does that count?)

  8. #8
    Gold Lounger
    Join Date
    Feb 2004
    Location
    Cape Town, RSA
    Posts
    3,444
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Email Hyperlink (2002 SP-2)

    Theres probably a better way, but something like =Mid([txtEMail],9,50) could work. Create this as a new txtbx and hid the bound txtbx in the report!
    Regards,
    Rudi

  9. #9
    5 Star Lounger bfxtrfcmgr's Avatar
    Join Date
    Aug 2002
    Location
    Fresno, California, USA
    Posts
    995
    Thanks
    12
    Thanked 0 Times in 0 Posts

    Re: Email Hyperlink (2002 SP-2)

    Hans,

    Thanks friend, you had already given me a clue in an earlier post on how to deal with this.
    =IIf([txtEmail] Not Is Null,Mid([txtEmail],InStr([txtEmail],"#")+8,InStr(InStr([txtEmail],"#")+8,[txtEmail],"#")-InStr([txtEmail],"#")-8),"No Data")
    For anyone "lurking" about; this was to strip away the leading "mailto:" from the hyperlink in a report. The other issue there was to deal with null entries in the hyperlink field (i.e. no email address).
    Thanks, also, to Rudi for your input!
    Bryan,
    Not the smartest critter on the glacier. . .
    . . .but I'm persistent (does that count?)

  10. #10
    Super Moderator
    Join Date
    Jun 2002
    Location
    Mt Macedon, Victoria, Australia
    Posts
    3,993
    Thanks
    1
    Thanked 45 Times in 44 Posts

    Re: Email Hyperlink (2002 SP-2)

    I deal with this by always stroring email addresses as plain text without the mailto, and then I add the mailto in code when sending email.

    Dim strEmailAddress as string
    strEmailAddress = "mailto:" & me![txtEmail]
    Application.FollowHyperlink strEmailAddress, , True
    Regards
    John



  11. #11
    Star Lounger
    Join Date
    May 2002
    Posts
    53
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Email Hyperlink (2002 SP-2)

    John,
    If you don't mind going back a few weeks, where do you enter this code that adds the mail to:?

    Thanks!
    Sarah

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

    Re: Email Hyperlink (2002 SP-2)

    Say that you have a command button cmdMail on a form, next to a text box txtEmail that contains an e-mail address. The On Click event procedure for the command button would contain the code posted by John:

    Private Sub cmdMail_Click()
    Dim strEmailAddress as string
    strEmailAddress = "mailto:" & me![txtEmail]
    Application.FollowHyperlink strEmailAddress, , True
    End Sub

  13. #13
    Star Lounger
    Join Date
    May 2002
    Posts
    53
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Email Hyperlink (2002 SP-2)

    Thanks Hans. I hadn't thought about doing it from a command button, I was too focused on the hyperlink aspect. Thanks [img]/forums/images/smilies/smile.gif[/img] Sarah

  14. #14
    Super Moderator
    Join Date
    Jun 2002
    Location
    Mt Macedon, Victoria, Australia
    Posts
    3,993
    Thanks
    1
    Thanked 45 Times in 44 Posts

    Re: Email Hyperlink (2002 SP-2)

    I also put it in the double click event of a control displaying an email address.
    Regards
    John



Posting Permissions

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