Email Address

AnnPhil

Registered User.
Local time
Today, 20:26
Joined
Dec 18, 2001
Messages
246
I have an access table that has an email address field that i have assigned a hyperlink data type. If i type an email address with the "mailto:" in front of the address it works fine. Is there a way to have the mailto come up automatically when you type the email address so you dont have to type it everytime.
thanks
 
If you are doing this in a table and clicking on the address to send the e-mail directly from the table you could add a format to the field. The below works as long as the address is not longer than the number of &'s.

"mailto: "&&&&&&&&&&&&&&&&&&&&&&&&&&&&

Kind of goofy - maybe someone has a more elegant solution for you.

GumbyD
 
GumbyD, that didn't work for me. It puts the "mailto:" somewhere in the middle of the address even though I typed the format exactly the way you show.
I also have several excel spreadsheets that have email addresses and when I import them into access they lose their "mailto" feature and access turns them into "http" format.
Does anyone know how I can import these email and not have to manual transpose them to email format? Right now every time I click on one it tries to open the Internet, not my email program. With over 800 addresses this could take awhile to fix manually and the chance of typos are there also.

Thanks for any suggestions
 
To answer the first part of the question - you need to add more &s in the format. Like I said this is not a great way to handle this code would be better- but you would need to be hitting the e-mail addresses from a form.

As for the other part of your question - you may want to start a second post in the Excel area.

GumbyD
 
Thanks Hayley i will take a look at the thread.

I did find a fix for the excel spreadsheet addresses!!! I did an update query that added "mailto:" to all the addresses in the access table and now they all work. That was easy, now to work on the other issue, let you know how i do once i take a look at the tread you suggested. i think i took alook at it when i first searched the forum but i am not to good with code so i will take another look at it.

thanks
 
Another Way

In case anyone is interested, I found another way to do it in which you can have the field type as hyperlink and be able to just click on the field in the form and it will open an e-mail.

Insert the following code into the BeforeUpdate event of the form:
Me![MyField] = "#mailto:" & Left(Me![MyField], InStr(1, Me![MyField], "#") - 1) & "#"

Be sure to change [MyField] to the name of your field.
 

Users who are viewing this thread

Back
Top Bottom