e-mail from a form (1 Viewer)

mjwillyone

Registered User.
Local time
Yesterday, 21:05
Joined
Aug 3, 2004
Messages
27
Friends,

I know that this topic has appeared in one form or another throughout the Forums. However, not being a code expert, I would like some "in my case" help.

I am wanting to create a button/etc that will create an email with the following:

1. addressed to joeschmo@his-mailaddress.com (this same person will always be receiving the e-mail we want to send.)

2) The subject line should be "Database Correction Request"

3) The body should say: "Dear Joe, I am requesting that there be a change to the database for (FirstName & LastName field from the current form). LineReturn LineReturn LineReturn Thanks, Mike"

What code do I use and how can I "program" this to work when I click a button or link?

Thanks,
Mike
 

bonekrusher

Registered User.
Local time
Yesterday, 19:05
Joined
Nov 19, 2005
Messages
266
You can use
Code:
DoCmd.SendObject acSendNoObject, "", "", Me.EMAIL, "", "", Me.sub, Me.Text23

just use your controls. In this example me.email is the email address on the form, me.sub is the subject control and etc... where the "" is, its for CC or bcc and such.
 

mavver

Registered User.
Local time
Today, 03:05
Joined
Jan 12, 2007
Messages
28
Hello,

This is something quite similar to something I am working on at the minute, where I want an email to be generated from a text box.

I have no code training at all, so I am trying to just work my way through it.

I am not bothered who the subject is, nor the subject title. All I want is to be able to have an email generated with the message body being derived directly from a text box on a form

The code I am working with at the min is actually very sparse :D and I can get it to open the email fine, but it will not attach the data within the text box. The text box is called Response. Can someone please take a look at the code to see what I am doing wrong.

Thanks in advance for all the help

Mav

DoCmd.SendObject _
, _
, _
, _
, _
, _
, _
, _
me.response, _
True
 

GaryPanic

Smoke me a Kipper,Skipper
Local time
Yesterday, 19:05
Joined
Nov 8, 2005
Messages
3,294
check the samples - quite a few in there that are excellent
 

mavver

Registered User.
Local time
Today, 03:05
Joined
Jan 12, 2007
Messages
28
ta Gary,

The only email sample I could find though was yours, and the attachment was still pending approval.

Is there any in there in particular that could be of help.

Ta for the taking the time out to help

Mav
 

CEH

Curtis
Local time
Yesterday, 21:05
Joined
Oct 22, 2004
Messages
1,187
DoCmd.SendObject [objecttype][, objectname][, outputformat][, to][, cc][, bcc][, subject][, messagetext][, editmessage][, templatefile]
 

Rudidudi

New member
Local time
Today, 03:05
Joined
Mar 8, 2007
Messages
1
can you post the actual line with the fields / text please ?
I am trying the above but am struggling to get it to work :(
thanks
 

Users who are viewing this thread

Top Bottom