Email Address field

  • Thread starter Thread starter Slim
  • Start date Start date
S

Slim

How do I create an email address field on my table so that a user can click
on the address and have it open the email program. The hyperlink type field
opens IE and tries to go to the web page. Any thoughts?

Thanks!
Slim
 
Hi Slim,
Perhaps the simplest way is to include the mailto: protocol in the
hyperlink e.g.
mailto:[email protected]



How do I create an email address field on my table so that a user can click
on the address and have it open the email program. The hyperlink type field
opens IE and tries to go to the web page. Any thoughts?

Thanks!
Slim

John Nurick [Microsoft Access MVP]

Please respond in the newgroup and not by email.
 
Slim,

If you use a hyperlink data type, you need to enter the data with the
mailto protocol predicate, for example...
mailto:[email protected]

- Steve Schapel, Microsoft Access MVP
 
I have had this issue arise before, and I even though I do not know how to
accomplish it code wise, I would think that prepending or adding the
"mailto:" to the field when it was clicked on would be much more elegant.

Getting someone to type the "mailto:" before every email address or even
seeing it in the field is distracting to the user...

What would be the best way to accomplish this?

Jay
 
Hi Jay,

You'd need to use an ordinary text field, not a hyperlink field, and a
form to display the data. And I'd use the double-click rather than the
click, or editing the field could be difficult!

Something like this (untested air code!) in the event procedure would do
the trick. txtEmail is the name of the textbox bound to the Email field:

If Len(Me.txtEmail.Value) > 0 Then 'ignore empty fields
FollowHyperlink "mailto:" & Me.txtEmail.Value
End If




I have had this issue arise before, and I even though I do not know how to
accomplish it code wise, I would think that prepending or adding the
"mailto:" to the field when it was clicked on would be much more elegant.

Getting someone to type the "mailto:" before every email address or even
seeing it in the field is distracting to the user...

What would be the best way to accomplish this?

Jay

John Nurick [Microsoft Access MVP]

Please respond in the newgroup and not by email.
 
Back
Top