From: deb on
how do i put a command on a button to generate a confirmation email when a
new client is created

so at the end of the form i already have a button that saves and prints but
i want it to send an email to the accounts manager with the form details as
well
--
deb
From: deb on
woo hoo - i'll answer my own question

just add a SendObject line to the existing save macro

nifty
--
deb


"deb" wrote:

> how do i put a command on a button to generate a confirmation email when a
> new client is created
>
> so at the end of the form i already have a button that saves and prints but
> i want it to send an email to the accounts manager with the form details as
> well
> --
> deb
From: ghetto_banjo on
you can use the SendObject command to create an email, and you don't
even need to attach an "object" to it if you don't want to.

Full syntax:
DoCmd.SendObject(ObjectType, ObjectName, OutputFormat, To, Cc, Bcc,
Subject, MessageText, EditMessage, TemplateFile)


If you dont want an attachment:

Docmd.SendObject , , , "recipient1(a)email.com", , , "subject line",
"blah blah blah", true



EditMessage = true, means that the email comes up to be edited first.
If this is false and you want to send it automatically, Outlook will
give a warning everytime that another program is trying to take
control of sending emails.