Email address storage

  • Thread starter Thread starter Ray
  • Start date Start date
R

Ray

I need to store email address in a couple of fields and open the desired
email client (I have several email clients on the pc) with the email address
automatically filled in the To column when I click the fields. Your
guidance to accomplish it is appreciated.

Thanks,

Ray
 
You can store them as text and code the double-click event, or store them as
a hyperlink. The hyperlink protocol requires that you add the mailto: tag.
If you store as text, you can add the tag in your code. I prefer the coded
method as it avoids using the hyperlink field which is sometimes flakey.
Here's a snippet of the code I use:

Dim strMail As String
strMail = "#MailTo:" & Me.txtEmail & "#"
Application.FollowHyperlink HyperlinkPart(strMail, acAddress)
--
Arvin Meyer, MCP, MVP
Microsoft Access
Free Access downloads:
http://www.datastrat.com
http://www.mvps.org/access
 
Arvin,

Many thanks for your suggestion. I like the first one and tried it
successfully. There is a minor issue on my computer. I have Lotus Notes
and Outlook email clients on the same pc. Now the program will open the
client according to the setting in the Internet Options of IE. Is it
possible to be controlled by the supplied code?

Ray
 
Arvin,
I have been looking for that for a long time. Where would I put that
code? I have a field on my form named "Email"
Thanks,
Darrell
 
First change the code from txtEmail to Email and copy it into memory.

1. Then open your form in Design View.
2. Double-click on the email textbox to bring up the property sheet.
3. Click on the Events tab.
4. Click in the Double-click event and choose [Event Procedure] from the
down arrow (combo box)
5. Click on the ellipses (...) button
6. Paste the code.
--
Arvin Meyer, MCP, MVP
Microsoft Access
Free Access downloads:
http://www.datastrat.com
http://www.mvps.org/access
 
Back
Top