field for an email address

M

Marion

I need to include an field for clients email addresses
which I was hoping I would be able to click on and
Outlook would open, allowing me to easily send a message
on the spot within the package, rather than having to
enter all the email addresses again in Outlook and send
messages from there.

I set the field up as a hyperlink field, but when I click
on the hyperlink it tries to open a webpage (which
obviously doesn't exist). Where am I going wrong? Which
data type should I apply to the field? Are there are
other properties that I need to adjust?
Any help gratefully received.
Marion
 
A

Allen Browne

It is possible to use HyperlinkPart() to parse the 3 (or 4) parts of a
hyperlink, and ensure it has a mailto: prefix instead of http://

However, it is easier just to use a text field. You can set its Click (or
DblClick) event to SendObject so that the user can send an email.
 
G

Guest

I have changed the data type to text, but where do I
change the event to SendObject. I looked in the
properties for the email text field in form view and can
not see anything in expression builder. Can you give me
some further information.

Many thanks Marion
 
A

Allen Browne

1. Set the On Dbl Click property of this text box on your form to:
[Event Procedure]

2. Click the Build button (...) beside this. Access opens the Code window.

3. Between the "Private Sub..." and "End Sub" lines, enter this:

If Not IsNull(Me.Email) Then
DoCmd.SendObject acSendNoObject,,,Me.Email,,,"G'day",,True
End If

Replace the word "Email" with the name of your text box.
 
M

Marion

Many thanks, I have got this working.
Your help has been much appreciated.

Marion

-----Original Message-----
1. Set the On Dbl Click property of this text box on your form to:
[Event Procedure]

2. Click the Build button (...) beside this. Access opens the Code window.

3. Between the "Private Sub..." and "End Sub" lines, enter this:

If Not IsNull(Me.Email) Then
DoCmd.SendObject acSendNoObject,,,Me.Email,,,"G'day",,True
End If

Replace the word "Email" with the name of your text box.

--
Allen Browne - Microsoft MVP. Perth, Western Australia.

Reply to group, rather than allenbrowne at mvps dot org.

I have changed the data type to text, but where do I
change the event to SendObject. I looked in the
properties for the email text field in form view and can
not see anything in expression builder. Can you give me
some further information.

Many thanks Marion
(or
4) parts of a of
http:// can
set its Click (or send
an email. in
message


.
 
T

Tim

I had this problem too. The quick way to get it to work
is to type "mailto:" in front of the email address in
each field; ie. "mailto:[email protected]". There is
probably a better solution to this, but I haven't had a
chance to look into this some more.
 

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