Hello, I am using Office 365 and am trying to create an email from my Access database in HTML using two linked queries. The email generated looks like this:
But my preference is to look like this with each CM following after each issue:
Below is my code... can anyone point me in the right direction?
Thank you.
But my preference is to look like this with each CM following after each issue:
Below is my code... can anyone point me in the right direction?
Code:
strBody2 = "<TABLE Border=""1"", Cellspacing=""0""><TR>" & _
"<TH Bgcolor=""#2B3856"", Align=""Center""><Font Color=#FFFFFF><b><p style=""font-size:14px"">No. </p></Font></TH>" & _
"<TH Bgcolor=""#2B3856"", Align=""Center""><Font Color=#FFFFFF><b><p style=""font-size:14px"">KPI </p></Font></TH>" & _
"<TH Bgcolor=""#2B3856"", Align=""Center""><Font Color=#FFFFFF><b><p style=""font-size:14px"">Ranking </p></Font></TH>" & _
"<TH Bgcolor=""#2B3856"", Align=""Center""><Font Color=#FFFFFF><b><p style=""font-size:14px"">RPS Started </p></Font></TH>" & _
"<TH Bgcolor=""#2B3856"", Align=""Center""><Font Color=#FFFFFF><b><p style=""font-size:14px"">Issue Details </p></Font></TH>" & _
"</TR>"
' add the data to the table
Set rs2 = CurrentDb.OpenRecordset(strSQL2, dbOpenDynaset)
rs2.MoveFirst
Do While Not rs2.EOF
strBody2 = strBody2 & "<TR>" & _
"<TD align=center width=""10%"">" & rs2.Fields![ZoneIssueNo].Value & "</TD>" & _
"<TD align=center width=""15%"">" & rs2.Fields![ZoneKPI].Value & "</TD>" & _
"<TD align=center width=""10%"">" & rs2.Fields![ZoneRankID].Value & "</TD>" & _
"<TD align=center width=""15%"">" & rs2.Fields![RPSStarted].Value & "</TD>" & _
"<TD align=left width=""50%"">" & rs2.Fields![ZoneIssue].Value & "</TD>" & _
"</TR>"
strBody3 = "<TABLE Border=""1"", Cellspacing=""0""><TR>" & _
"<TH Bgcolor=""#2B3856"", Align=""Center""><Font Color=#FFFFFF><b><p style=""font-size:14px"">CM Details </p></Font></TH>" & _
"<TH Bgcolor=""#2B3856"", Align=""Center""><Font Color=#FFFFFF><b><p style=""font-size:14px"">Responsible </p></Font></TH>" & _
"<TH Bgcolor=""#2B3856"", Align=""Center""><Font Color=#FFFFFF><b><p style=""font-size:14px"">Target Date </p></Font></TH>" & _
"</TR>"
' add the data to the table
Set rs3 = CurrentDb.OpenRecordset(strSQL3, dbOpenDynaset)
rs3.MoveFirst
Do While Not rs3.EOF
strBody3 = strBody3 & "<TR>" & _
"<TD align=left width=""40%"">" & rs3.Fields![CMDetails].Value & "</TD>" & _
"<TD align=center width=""15%"">" & rs3.Fields![Responsible].Value & "</TD>" & _
"<TD align=center width=""10%"">" & rs3.Fields![TargetDate].Value & "</TD>" & _
"</TR>"
rs3.MoveNext
Loop
rs3.Close
rs2.MoveNext
Loop
rs2.Close
Thank you.