Simple email field

Dave Titan

Registered User.
Local time
Today, 19:49
Joined
Jan 1, 2002
Messages
69
Maybe it's the 2 hours sleep I had last night, but I've totally forgotten how to set a field in a form up, that contains an email address, so you can click on it and it'll open up a blank email with the said address in it

Any ideas?

Thanks
 
If your field is name txtEmailAddress, and your button is named cmdSendEmail.

Then:
Private Sub cmdSendEmail_OnClick()
DoCmd.SendObject acSendNoObject, , , Me!txtEmailAddress, , , , , True

End Sub
 
Or set the field type as hyperlink in the table
 
Cheers, Unfortuately setting the field to Hyperlink does not work in this case as it seems to want to open up a website of the same name as the email address?

I Just want a user to click the "hyperlink" to send an email
 
If you are going to use the second option you will need to type in mail to as it will currently be set to http thus the reason why it wants to open a web page. Go into hyperlink and edit to ammend this.

HTH
Hay
 
I've tried "insert hyperlink" done the mail to but to no avail. The form just sits there.

In fact insert hyper link want's me to enter all the email addresses. I just want to click the email address on mu form and a new blank email opens.
 
Dave

Have a look at this sample but ignore the command button on the form I have been experimenting with this for other purposes. Instead click on the hyperlink and it should open outlook with the email address in it.

I have converted to A97 as I don't know what version you are using at least if you have a2k you can convert back.

HTH
Hay
 

Attachments

Hayley,

Thanks for the help, and file.

I've copied everything I can think of into my DB that you had regarding the email. But still it tries to open in http. Yours does open in outlook.

Now I can go into table view in mine and individually edit each email address and switch them to Mailto: and it works

But that kinda defeats the purpose?!!

Is there no way for a user to just type an email address into the email field and then click on it to send an email. Rather than having to go into table view select edit hyperlink then Mailto:????

I know I'm not picking up on something here. I just don't know what?
 
I'm not sure to be honest Dave I know the cmdbutton opens the outlook in http then email this is a problem I am having with regards to the post in the reports section Email Single Record but in this sample if you click directly on the hyperlink then it's ok because it has been changed in the table maybe Bukhix will show up and help you out he/she is the one when it comes to email..I'm sure someone else is going to tell me they're superb with email as well now and I've forgotten to mention them!!
 
:) Thanks for the help Hayley.

I'll continue on here with the problem. It's kinda strange because years ago I made email fields with no problem. Then upgraded to 2000 and nothing I do seems to work anymore.... either that or the brain's heading down hill!

Thanks Again
 
Dave

I am not sure if you have found an answer to this problem…

However, the way I do this is;

I make no changes to the field type in my table…for the most part it is set to text…

I use a button with this code in the OnClick event…


####### Code Starts Here #######

On Error Resume Next
cmdEmail.HyperlinkAddress = "mailto: " & Me!Email

####### Code Ends Here #######

NOTE:

cmdEmail is the name of the button…

Me!email is the field containing the email address on the form…

Hope This Helps

Don
 
Email a record

Is there a way to email the contents or the contents of some on the fields on a record. I want to be able to click on a command button and all of the informarion be copied into an email readyy to send. Is this possible. I have programmed a command button to open and email message with the email address in it, ut I now want to know how to copy other information into it.

Could someone please instruct me
 
Email a record

Is there a way to email the contents or the contents of some on the fields on a record. I want to be able to click on a command button and all of the informarion be copied into an email readyy to send. Is this possible. I have programmed a command button to open and email message with the email address in it, ut I now want to know how to copy other information into it.

Could someone please instruct me
 

Users who are viewing this thread

Back
Top Bottom