Export field data on form to email

  • Thread starter Thread starter borris
  • Start date Start date
B

borris

hi all,

i'm not sure if this belongs in the form or code section so i'll ask here
first. i hope you don't mind.

i have a database that logs details of candidates entering a competition.

when the data entry part of each form is done i want to click a button so
that it generates an automatic standard acknowledgement email. i don't want
the email to be sent automatically as i'd rather double check it before it
is sent and add any other text that may need to be added.

i'd like it to look something like this, text in <brackets like this>
equals the text from the fields in the form i'd like to import to the
email:

----
*automatically insert email address of <NominatorEmail> to email address
field in email client*

Dear <NominatorTitle> <NominatorSurname>

Thank you for nominating <NomineeFirstName> <NomineeSurname>. This email is
to confirm receipt of your nomination.

Kind regards

**end**
 
Borris,

You could use the SendObject method to generate the email. Your code
will look something like this...

Dim strMessage As String
strMessage = "Dear " & Me.NominatorTitle & " " & Me.NominatorSurname &
vbCrLf & vbCrLf & _
"Thank you blablabla..."
DoCmd.SendObject acSendNoObject, , , Me.NominatorEmail, , ,
"Acknowledgement", strMessage, True
 
Borris,

You could use the SendObject method to generate the email. Your code
will look something like this...

Dim strMessage As String
strMessage = "Dear " & Me.NominatorTitle & " " & Me.NominatorSurname &
vbCrLf & vbCrLf & _
"Thank you blablabla..."
DoCmd.SendObject acSendNoObject, , , Me.NominatorEmail, , ,
"Acknowledgement", strMessage, True

that's it. thank you very much. that's exactly what i required.
 
Back
Top