e-mail field

  • Thread starter Thread starter red
  • Start date Start date
R

red

Hi,
I have a field in my table which is set as a hyperlink. In my Contacts form
i want to enter an e-mail address to use later.
How do i enter data into this field so that it is saved as Mailto: rather
than HTTP: (so that i don't have to right click, edit hyperlink......)
Can this be done with a piece of code using VB?
 
Just use a text field rather than a hyperlink.

You can still use the text field with code from a form like:

Dim strMail As String
strMail = "#MailTo:" & Me.txtEMail & "#"
Application.FollowHyperlink HyperlinkPart(strMail, acAddress)
 
Save it as a text rather than hyperlink... then, for the control's OnClick
procedure you can use the following line:

Application.Followhyperlink "mailto:" & Me.ControlName


I think that should do... you may not need the mailto line there, it may do
it automatically.

hth
--
Jack Leach
www.tristatemachine.com

"I haven''t failed, I''ve found ten thousand ways that don''t work."
-Thomas Edison (1847-1931)
 
Thanks Jack,
Works a treat!

Jack Leach said:
Save it as a text rather than hyperlink... then, for the control's OnClick
procedure you can use the following line:

Application.Followhyperlink "mailto:" & Me.ControlName


I think that should do... you may not need the mailto line there, it may do
it automatically.

hth
--
Jack Leach
www.tristatemachine.com

"I haven''t failed, I''ve found ten thousand ways that don''t work."
-Thomas Edison (1847-1931)
 
Back
Top