Email Control?

  • Thread starter Thread starter Chaplain Doug
  • Start date Start date
C

Chaplain Doug

I have a field which contains the email address of a
person. How may I display this on a form so that when the
user clicks on the email address they are able to send a
message to thie person? Is there an email control? I am
currently using a text box to display the email field.
Thanks.
 
Hi,

You could define the field as hyperlink in the table
itself, but most experts use a standard text field as you
are doing.

Here is some code supplied by MVP Cheryl Fisher which
should help you get started:

****Begin Quote:

Here is the code to put behind your command button:

Dim strEmail as String

strEmail = "mailto:" & Me!strContactEmail
Application.FollowHyperlink Address:=strEmail

NOTE: The table field to which your text box,
strContactEmail, is bound should be a Text type field -
not a Hyperlink type field.

****End Quote

Hope that helps,
Jeff Conrad
Bend, Oregon
 
Hi again,

Instead of a command button you could just put the code in
the Click event or DblClick event of the text box control.
I prefer the DblClick event.
Also, I misspelled Cheryl's name. It should be Cheryl
Fischer. Sorry.

Jeff Conrad
Bend, Oregon
 
<g> My life is complete - I've been quoted! <g>

It's probably best to avoid the Click event, in case a user clicks into the
text box for editing instead of tabbing to it. You can also make the text
underlined and the forecolor blue or something so that it sort of looks like
it should "do something".
 
-----Original Message-----
<g> My life is complete - I've been quoted! <g>

LOL!!
I was hoping you would miss my mistake, but apparently not!
It's probably best to avoid the Click event, in case a
user clicks into the text box for editing instead of
tabbing to it. You can also make the text underlined and
the forecolor blue or something so that it sort of looks
like it should "do something".

Excellent points.
I'll have to add that to my quote next time!
;-)

Jeff Conrad
Bend, Oregon
 
Back
Top