View Full Version : email addresses within forms


andy_lucas
01-21-2002, 09:48 AM
Is there any way in which I can have an email address for a particular field displayed on a form that can then be clicked upon (as a hyperlink) to open Outlook Express with a new message with the 'To:' part containing that address.

Cheers

mrssevans
01-21-2002, 09:53 AM
Try this: mailto:emailaddress?subject=putsubjecthere. http://www.access-programmers.co.uk/ubb/smile.gif

BukHix
01-21-2002, 10:22 AM
You can do a lot with VBA's SendObject. Here is an example:

Put this behind the comand button:

DoCmd.SendObject , , , Me.txtEmail, , , "YourSubject", "BodyText", True

Then just replace the Me.txtEmail with Me.YourTxtBox that holds the email address.

If you want to use a subject line, or message text from a control (text box) you can substitute: (note the absense of the quotes when you use Me.AnyThing)

"YourSubject" with Me.YourSubject (replace your subject with your text box name)

"BodyText" with Me.YourText (This will be put in the body of the message)

[This message has been edited by BukHix (edited 01-30-2002).]

Fornatian
01-21-2002, 10:49 AM
You can also as a simple way of doing it use:

Application.FollowHyperlink "mailto:" & Me.EmailField

andy_lucas
01-21-2002, 10:51 AM
This is a field (ClientEmail) that contains an email address. (I have set it as Hyperlink) do I double click on that and type this code? Sorry to sound dumb but I am a real novice