Email Subject heading Derived from Form text field Value/s

  • Thread starter Thread starter Peter Allanach
  • Start date Start date
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?
 
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.
 
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.
 
Back
Top