By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,611 Members | 1,661 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,611 IT Pros & Developers. It's quick & easy.

Setting hyperlink for email

P: n/a
I have noticed that if you right click on a hyperlink field and edit
the hyperlink, you can set it to be an email address and open up
Outlook when it is clicked.

I have been trying to set this up the same way at runtime, but I
haven't been able to get it to work.

The field [email] is set to be a hyperlink field. Then I try this:

myString = Me.Email & "#" & "mailto:" & Me.Email & "#"
Me.Email = myString
This is essentially the same method I use to open up things like
folders and such, but when I try it here, it still trys to open it up
with the prefix http://

I tried to pattern the string after the way that access sets the
hyperlink when I manually configure the hyperlink to be an email
address; but apparently I am missing a step.

My goal isn't to have the person type in the subject line and body of
the email within Access, but rather I just want to have Outlook open a
new message window, just like it does when you manually configure the
hyperlink to be an email address.

Any thoughts?


Jody Blau

Mar 5 '06 #1
Share this Question
Share on Google+
1 Reply

P: n/a
I figured it out.

The problem was in the data provided by the reference to Me.Email

It works when I made the following adjustment:

Dim myString As String
myString = Me.Email.Hyperlink.TextToDisplay & "#" & "mailto:" &
Me.Email.Hyperlink.TextToDisplay & "#"

Me.Email = myString

Which I placed in my afterupdate event.

Mar 5 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.