e-mail field

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?
 
A

Arvin Meyer [MVP]

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)
 
J

Jack Leach

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)
 
R

red

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)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top