EMAILS FROM ACCESS

D

Developerme

I have a report that is emailed from Access through VBA if it 'qualifies' to
be sent. There are instances where another report needs to be sent seperately
from Access subject to what the 1st report was. I do not want to combine the
reports into 1 email. So, what happens is that the 1st email goes out with no
problems, but the subsequent email will not engage. I checked that the second
report has no problems but switching the 1st and 2nd report and again, only 1
report will engage and email. Anyone know what the possible problem is?
 
P

Pete D.

You need to provide more info such as code to send email, macros, how are
you deciding what triggers second report. Sorry, need more information.
 
D

Developerme

Code is:

DoCmd.SendObject acReport, "Lmodification - Print", "PDFFormat(*.pdf)",
[Forms]![Fapplication]![Text2013], "", "", "", True, ""

Same code for next report and if applies I used If statement and also used
Eval statement. The qualifies is simple, if 'word' = 'word' then send report
 
D

Developerme

Am I missing something here? Are you saying that mighty Access 2007 will ONLY
allow 1 email to go out at a time?
 
B

BruceM

Always assume Aaron is wrong. I am not familiar with the details of sending
several e-mails, but it was certainly possible in previous versions of
Access, and I expect 2007 has the same functionality.
 
A

a a r o n . k e m p f

yes, Jet is too flakey for real world usage.

stack a couple of queries on top of each other and the Jet chipmunks
start complaining.

If Jet lets you send ONE email but then not the next-- then you should
move to a platform that is more reliable
 
D

Developerme

Well, i still have not located the right code for it although I continue to
work on it. I suspect you may be correct but only to the extent where 'jet'
is unable to 'reset' the email parent window so it can 'recognize' that
another email can and is ready to be sent out. When I exit the Form that
causes the email to be generated and return to it, then it creates the email
just fine. I have returned to my original configuration where the user has to
select each command that is available if another report qualifies to be sent.
Somewhere out there there has to be the answer though.
 
B

Beetle

Just ignore Aaron. He's a troll. It would make absolutley no difference what
question you posted here, his answer would be "move to SQL Server". That's
how he answers every single question, regardless of the context.

A2007 certainly is capable of sending multiple e-mails. The problem may
be in how you are coding it. If you can post the code you are currently using,
someone may be able to offer some advice.
 
A

a a r o n . k e m p f

Sean;

you're wrong.

if your database isn't reliable-- it's time to move upstream
 
D

Developerme

Here is the code. Let's see if someone can help with this simple question?

If (Forms!Fapplication!Text2692 = "Home loan Services" Or
Forms!Fapplication!Text2692 = "First Franklin" Or Forms!Fapplication!Text2692
= "First Franklin Loan Services" Or Forms!Fapplication!Text2692 =
"Nationpoint" Or Forms!Fapplication!Text2692 = "National City" Or
Forms!Fapplication!Text2692 = "National City Loan") Then
DoCmd.OpenForm "Ftblnotes", acNormal, "", "", , acHidden
Forms!Ftblnotes!ProspectID = Forms!Fapplication!Text330
Forms!Ftblnotes!Prospectlastname = Forms!Fapplication!Text334
Forms!Ftblnotes!Calldate = Date
Forms!Ftblnotes!Calltime = Time()
Forms!Ftblnotes!Subject = "Sent mail"
Forms!Ftblnotes!Code1 = "Thank you"
Forms!Ftblnotes!Notes = "Sent First Franklin et all subsidiaries
financial worksheet by email to " & [Forms]![Fapplication]![Text2013] & ". "
& [Forms]![Fuser]![Text0]
DoCmd.Close acForm, "Ftblnotes"
DoCmd.OpenForm "Faddmarketingdates", acNormal, "", "", , acHidden
Forms!Faddmarketingdates!ProspectID = Forms!Fapplication!Text330
Forms!Faddmarketingdates!Lastname = Forms!Fapplication!Text334
Forms!Faddmarketingdates!Symbol = "Solution"
Forms!Faddmarketingdates!Type = "Lmodificationfirstfranklin - Print"
Forms!Faddmarketingdates!Code = "Modapplication"
Forms!Faddmarketingdates!Code1 = "Modapplication"
Forms!Faddmarketingdates!Field19 = Date
Forms!Faddmarketingdates!Notes = ""
Forms!Faddmarketingdates!Dateprinted = Date
Forms!Faddmarketingdates!Datesent = Date
Forms!Faddmarketingdates!Method = "Email"
Forms!Faddmarketingdates!Email = Forms!Fapplication!Text2013
DoCmd.Close acForm, "Faddmarketingdates"
DoCmd.OpenForm "Flenderinfosearch", acNormal, "",
"[Forms]![Fapplication]![Text2692]=[Tblgeneric2]![Lender]", , acHidden
DoCmd.OpenForm "Floanmodificationinfo", acNormal, "",
"Forms!Fapplication!Text330 = [Tblmodification]![ProspectID]", , acHidden
DoCmd.OpenForm "Fapplicationcontactinfo", acNormal, "",
"Forms!Fapplication!Text330 = [Tblprospects]![ProspectID]", , acHidden
DoCmd.SendObject acReport, "Lmodificationfirstfranklin - print",
"PDFFormat(*.pdf)", [Forms]![Fapplication]![Text2013], "", "", "LOAN
MODIFICATION LENDER SPECIFIC FINANCIAL STATEMENT", "Many of our clients have
been surprised with the solutions we have provided - solutions that they were
not aware of or thought they could not qualify for. Some of these solutions
were challenging for us, but the results were self-evident - our clients got
what they wanted and needed! Thank you for considering us for assisting you
regarding this matter. If you have any questions, please feel free to contact
me.", True, ""
DoCmd.Close acReport, "Lmodificationfirstfranklin - Print"
End If
If (Forms!Fapplication!Text2692 = "HFN" Or
Forms!Fapplication!Text2692 = "HSBC" Or Forms!Fapplication!Text2692 =
"Household Financial" Or Forms!Fapplication!Text2692 = "Household" Or
Forms!Fapplication!Text2692 = "Household Financial Network" Or
Forms!Fapplication!Text2692 = "Household Financial Mortgage") Then
DoCmd.OpenForm "Ftblnotes", acNormal, "", "", , acHidden
Forms!Ftblnotes!ProspectID = Forms!Fapplication!Text330
Forms!Ftblnotes!Prospectlastname = Forms!Fapplication!Text334
Forms!Ftblnotes!Calldate = Date
Forms!Ftblnotes!Calltime = Time()
Forms!Ftblnotes!Subject = "Sent mail"
Forms!Ftblnotes!Code1 = "Thank you"
Forms!Ftblnotes!Notes = "Sent HSBC financial worksheet by email to "
& [Forms]![Fapplication]![Text2013] & ". " & [Forms]![Fuser]![Text0]
DoCmd.Close acForm, "Ftblnotes"
DoCmd.OpenForm "Faddmarketingdates", acNormal, "", "", , acHidden
Forms!Faddmarketingdates!ProspectID = Forms!Fapplication!Text330
Forms!Faddmarketingdates!Lastname = Forms!Fapplication!Text334
Forms!Faddmarketingdates!Symbol = "Solution"
Forms!Faddmarketingdates!Type = "Lmodificationhsbc - Print"
Forms!Faddmarketingdates!Code = "Modapplication"
Forms!Faddmarketingdates!Code1 = "Modapplication"
Forms!Faddmarketingdates!Field19 = Date
Forms!Faddmarketingdates!Notes = ""
Forms!Faddmarketingdates!Dateprinted = Date
Forms!Faddmarketingdates!Datesent = Date
Forms!Faddmarketingdates!Method = "Email"
Forms!Faddmarketingdates!Email = Forms!Fapplication!Text2013
DoCmd.Close acForm, "Faddmarketingdates"
DoCmd.OpenForm "Flenderinfosearch", acNormal, "",
"[Forms]![Fapplication]![Text2692]=[Tblgeneric2]![Lender]", , acHidden
DoCmd.OpenForm "Floanmodificationinfo", acNormal, "",
"Forms!Fapplication!Text330 = [Tblmodification]![ProspectID]", , acHidden
DoCmd.OpenForm "Fapplicationcontactinfo", acNormal, "",
"Forms!Fapplication!Text330 = [Tblprospects]![ProspectID]", , acHidden
DoCmd.SendObject acReport, "Lmodificationhsbc - print",
"PDFFormat(*.pdf)", [Forms]![Fapplication]![Text2013], "", "", "LOAN
MODIFICATION LENDER SPECIFIC FINANCIAL STATEMENT", "Many of our clients have
been surprised with the solutions we have provided - solutions that they were
not aware of or thought they could not qualify for. Some of these solutions
were challenging for us, but the results were self-evident - our clients got
what they wanted and needed! Thank you for considering us for assisting you
regarding this matter. If you have any questions, please feel free to contact
me.", True, ""
DoCmd.Close acReport, "Lmodificationhsbc - Print"
End If



ExitProc:
Exit Sub
ProcError:
Select Case Err.Number
Case 2501 'No Data
Case Else
MsgBox "Error " & Err.Number & ": " & Err.Description, _
vbCritical, "Error in cmdPreviewOrders_Click event
procedure..."
End Select
Resume ExitProc
 
P

Pete D.

Hi, If you are still here, your question is good and this tread has been
hijacked by other interests. Post a new thread with your question and add
the information requested from this one. Lots of good folks can answer
this question but may have stopped watching it due to a person below.
message
Sean;

you're wrong.

if your database isn't reliable-- it's time to move upstream
 
Top