Hi all,
I have 3 tables, table1 is connected 1:n to table2 and table3 with referential integrity.
Putting all together in a form and generating an email via Outlook is working fine so far.
My problem:
if table2 has 4 data sets and table3 only 1 data set, the output of table3 in the email is
doublicated to the number of data sets of table2, this means in this example, the output of
table3 in the email shows 4 entries.
Can anyone help me to solve this problem please.
#email vba
# output table2
RS.MoveFirst
Do While Not RS.EOF
strBody = strBody & "<tr><td>" & RS!field1table2 & "</td><td>" & RS!field2table2 & "</td></tr>"
RS.MoveNext
Loop
strBody = strBody & "<br />"
# output table3
RS.MoveFirst
Do While Not RS.EOF
strBody = strBody & "<tr><td>" & RS!field1table3 & "</td><td>" & RS!field2table3 & "</td></tr>"
RS.MoveNext
Loop
strBody = strBody & "<br />"