Confused.
I typed the code as instructed.
What is [ControlName]?
I was able to create a commond button to access Outlook Express BUT not from
the property of the email field on the form.
Look forward to reply.
Thank you.
Joan
Joan,
I'm confused also.
It is customary, when responding in a newsgroup, to keep the response
within the same thread. This permits all readers to read the previous
posts and to follow along. Others may then respond to your question
and, and as a result, you get your answer much quicker, as well as
everyone getting a chance to learn from your message.
If I hadn't seen my name in the subject line, I would not have made
sense of this message. Even so, I had to take time to look up the
previous message.
To any other reader trying to make sense of this, here is the previous
question and my response (I think, as the From: address is not the
same as the current From: address and there is no name associated with
the original message):
I have a database containing an email field. A form has
been created with this field in it. I have set properties
for this field to hyperlink.
I like to add a button to this form with ..Email..
What is the OnClick code for this button, so that when I
click on it, Outlook Express opens automatically with the
corresponding email address in the to:
Much obliged for any help
The first thing to do is to change the table field's datatype to Text.
Then open the Form in design view.
While I suggested the control's double-click event,
if you wish to use a command button simply code the command button
click event:
Application.FollowHyperlink "Mailto:" & [ControlName]
I don't know what that control's name is, so where I use the generic
[ControlName] you substitute your actual form's control name (the
control that displays the address of the person you wish to email to).
You do not need any other code.
Whichever program is your default email program will be the one that
opens, with the address already entered of address shown on the
current form.
Hopefully, I've answered the correct message. If you do have a
follow-up question, please keep it in this thread.