Change text to email hyperlink

G

Guest

We currently store email addresses in a text field which I wish to change to
a hyperlink field. If I change the field type to hyperlink and use the
following code on the form field this works perfectly for new addresses that
are input.

Private Sub Tut_Email2_AfterUpdate()
Me![Tut_Email2] = Me![Tut_Email2].Text & "#" & "MailTo:" &
Me![Tut_Email2].Text
End Sub

However, all of the existing data registeres as http://. Is their a way of
updating all of the currently stored email addresses to change them to
'mailto' rather than 'http://'. I have tried various update queries without
success.
 
T

Tony Toews

CoresysAdmin said:
We currently store email addresses in a text field which I wish to change to
a hyperlink field.

Why do you want to change the field to a hyperlink field?

Tony
--
Tony Toews, Microsoft Access MVP
Please respond only in the newsgroups so that others can
read the entire thread of messages.
Microsoft Access Links, Hints, Tips & Accounting Systems at
http://www.granite.ab.ca/accsmstr.htm
 
G

Guest

In order that when we click on the email address it generates a new email
with the address pre-filled. Currently we are having to cut and paste the
email address in to the new email. If there is a better way of doing this I
am open to suggestions.

Cheers

Michele
 
T

Tony Toews

CoresysAdmin said:
In order that when we click on the email address it generates a new email
with the address pre-filled. Currently we are having to cut and paste the
email address in to the new email. If there is a better way of doing this I
am open to suggestions.

You could use the SendObject command in a bit of code behind the form.
Something like
DoCmd.SendObject acSendNoObject, , , me!<name of field on form
containing the email address>

Tony
--
Tony Toews, Microsoft Access MVP
Please respond only in the newsgroups so that others can
read the entire thread of messages.
Microsoft Access Links, Hints, Tips & Accounting Systems at
http://www.granite.ab.ca/accsmstr.htm
 
G

Guest

Thanks for this - really helpful.

Tony Toews said:
You could use the SendObject command in a bit of code behind the form.
Something like
DoCmd.SendObject acSendNoObject, , , me!<name of field on form
containing the email address>

Tony
--
Tony Toews, Microsoft Access MVP
Please respond only in the newsgroups so that others can
read the entire thread of messages.
Microsoft Access Links, Hints, Tips & Accounting Systems at
http://www.granite.ab.ca/accsmstr.htm
 

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