Hi WGM, thank you for finding what i still can't, please correct me if i am wrong, in fact i know i am wrong because it doesn't work
So my interpretation of this section is:
1: Open the recordset with (in this instance x 3 records
Code:
Set rs2 = CurrentDb.OpenRecordset(strQRY)
2: Tell the recordset to start a loop while it's not at the end of file
Code:
Do While Not rs2.EOF
3: set the table and data from the recordset
Code:
strHTML = "<HTML><head><style>" & _ "table{border-collapse:collapse; width: 35%} td,th{text-align:left} table,td,th{border: 2px solid blue;}" & _
"</style></head><Body><table>" & _
strFS & "<tr><th>Week Commencing:</th><td>" & Format(DateAdd("d", 3, rs2.Fields("ShipmentDate")), "ddd-dd-mmm-yyyy") & "</td></tr>" & _
"<tr><th>Customer:</th><td>" & rs2.Fields("Customer") & "</td></tr>" & _
"<tr><th>Collection From:</th><td>" & Replace(sCollFrom, "|", "<br>") & "</td></tr>" & _
"<tr><th>Lift Type:</th><td>" & rs2.Fields("LiftType") & "</td></tr>" & _
"<tr><th>Lift Details:</th><td>" & rs2.Fields("LiftNo") & "</td></tr>" & _
"<tr><th>Collection Date:</th><td>" & "TBC" & "</td></tr>" & strF "</table>"
4: Tell the email body it should be x 3 records (or recordset count) but 3 in this instance
5: move through the records
6: No record breaks / Continue for all records
Based on your comment, That is beacuse you are overwriting strBody each time?
i moved the strBody = strHTML after the loop, still 1 record out of 3
Debug is showing 3 html collect from taken from rs5
Code:
"<tr><th>Collection From:</th><td>" & Replace(sCollFrom, "|", "<br>") & "</td></tr>" & _
email is showing 1 table with 1 record
I am certainly nuts because I must have incorrect interpretation of this!!!!!