Send email from within ACCESS

  • Thread starter Thread starter Brian C
  • Start date Start date
B

Brian C

If I have a form with an email address and allow the user
to enter some text then can I email that text to that
address by linking to Outlook?
 
Hello Brian,

There is a macro action -- SendObject -- that you can use
to do this. To send only the current record, I had to set
my query to "1" as the "Top Values".

Hope this helps,
Dd
 
Hi

I am using this at present from Access 2000

-----------------------------------------------------------
Dim MsgText As Strin
Dim Recipient As Strin
Dim SubjectStr As Strin
Dim ProjectIDStr As Strin
Dim MilstoneNoStr As Strin

Recipient = "(e-mail address removed)" ' The target email addres
SubjectStr = "Project Milestone Report due in one month

DoCmd.OpenForm "frm_MilstonesDue", acNorma
ProjectIDStr = Forms!frm_MilstonesDue!ProjectID.Valu
MilstoneNoStr = Forms!frm_MilstonesDue!MileNo.Valu

MsgText = "This is a reminder that your next milestone report for " & vbCr &
"Project: " & ProjectIDStr & vbCr &
"Milestone: " & MilstoneNoStr & vbCr &
"is due in one month " &
"and should be forwarded as soon as possible." & vbCr &
"If there is any problem in meeting this deadline please contact your Chief Scientist." & vbCr & vbCr &
"System Generated Email" & vbCr & "SARDI Project Database

Set myOlApp = CreateObject("Outlook.Application"
Set myItem = myOlApp.CreateItem(olMailItem
myItem.Subject = SubjectSt
myItem.To = Recipien
myItem.Body = MsgTex
myItem.Sen
-----------------------------------------------------

As you can see, this is pulling project milestone data from a database and emailing reminders to research scientists
You could use
Recipient = Forms!YourForm!YourEmailBox.Valu
an
MsgTxt = Forms!YourForm!YourContentBox.Valu

I hope this helps
Kai
 
Back
Top