Email Subject heading Derived from Form text field Value/s

P

Peter Allanach

Can I create a button on a form which takes the value of a
text field (or more then a one text field concatinated
together)and then uses this value to populate the Subject
Line of an email message to be sent. ie this would mean
once clicked the value will vary depending upon which
record the form is displaying?
 
S

SimonM

For a quick and dirty method of doing this, try
the "SendObject" macro.

If you enter =Forms![FormName]![ControlName] in
the "Subject" argument then this will be used as the
subject of the e-mail. Then run this from the OnClick
event of a command button.

Note that you don't have to send an object with the
SendObject macro, you can leave the "ObjectType"
and "ObjectName" arguments blank.
 
M

Mike Painter

Peter Allanach said:
Can I create a button on a form which takes the value of a
text field (or more then a one text field concatinated
together)and then uses this value to populate the Subject
Line of an email message to be sent. ie this would mean
once clicked the value will vary depending upon which
record the form is displaying?

See SendObject in help.
DoCmd.SendObject ......
The subject would just be Me!thisField or Me!ThisField & " " & Me!ThatField.

The complete e-mail can be sent this way.
 

Ask a Question

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.

Ask a Question

Top