How you you set a field to "email format"?
There is no such format as "email" format. There is a Hyperlink Data Type
available that takes an internet domain (www.somesite.com) and formats it so
that a click takes the user to the indicated web site. However, these are
annoying to edit to make them "mailto's" instead of "http's".
If you are looking for a way that a user can click on some data in a form
and have it open your MAPI-compliant email client, here is a suggestion:
Presuming that your form has a text box control named: EMail: You can use
the control's properties to make the ForeColor blue and Underscored (so that
it looks "special and kind of like a hyperlink"). Then insert the
following code behind the Double Click event of that text box.
Dim strEmail as String
strEmail = "mailto:" & Me.
Substitute your actual field name for EMail in the above code.
In the event that this is the first time that you will have to code an
event, here is how to do it:
In your form's design view, right-click on the text box containing the email
address, then select Properties from the pop-up menu. In the properties
sheet for that text box, find the DblClick event and click anywhere on that
line. You will see a downward pointing arrow at the right edge of the line.
Click it and select Event Procedure. Then, look for the small button to the
right of the downward pointing arrow which contains an ellipsis (three dots
...). Click this button to open the code window for the Dbl Click event.
When the code window is first opened, it will look like this:
Private Sub Email_DblClick(Cancel As Integer)
You will want to insert the following lines after the "Private Sub
Email_DblClick(Cancel as Integer)" line
Dim strEmail as String
strEmail = "mailto:" & Me.[EMail]
Save and close the code window; save your form and return it to form view.
Double click on your text box email value and your MAP-compliant email
client should open with the email address in the TO: line.
Cheryl Fischer, MVP Microsoft Access
Law/Sys Associates, Houston, TX
How you you set a field to "email format"?[/QUOTE][/QUOTE]
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.
|Access Import MS Outlook messages into MS Access - The Email Body Loses Formatting||0|
|Excel Conditional Formatting||1|
|Access 2007: Formatting a text field in a datasheet||1|
|Parse Name <Email>||4|
|formatting currency field||2|
|Access Automatically Send a notification email once a record is added||0|
|One field, multiple e-mail addresses - mail merge?||12|