Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How the ******** Do I autocomplete the email adress 1

Status
Not open for further replies.

mundia22

ISP
Apr 23, 2002
17
0
0
GB
Hi there, I wonder If you can help, Silly as it might be but I am trying to send emails from a form.
What I have is a text box that shows the email adress of a person, I have made it a hyperlink. on the hyperlinks Dialogue box there is the email address's address field: but I want to do is to use the the textbox's text as the address.

so in otherwords I click on the link and pop comes the write new message toy already with that address in it. in HTML it's Mailto:xxxxxxxxx
 
For this to work the text box needs to be bound to a field in a table thats data type is hyperlink.

(An unbound text box that is set to hyperlink=yes will not work.)

Then if you type in mailto:\\tim@sumrallworks.com in that field it should be clickable and open new mail.

If you type in just tim@sumrallworks.com then Access treats it like a webpage (http:\\ rather than mailto:\\)

You change any that get messed up by right clicking on the text box > hyperlink > edit Hyperlink and then change http to mailto.
 
In design mode of the form, open the properties for the Email text box. On the AfterUpdate event, put the following code. Make sure to change the to [name of your email field].

Private Sub Email_AfterUpdate()
Me![Email] = "#mailto:" & Left(Me![Email], InStr(1, Me![Email], "#") - 1) & "#"
End Sub

This will let the data entry person type in a standard email and the place the mailto: in automatically. Also be sure the Is Hyperlink is set to Yes.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top