I have a few tables with related data to send to interested contacts (in a table). I've put a button on a form, tied it to a module, and executed it successfully, looping through the records and checking that each contact is found and appropriate data put into the a message. However, when I use the sendObject, it successfully sends mail twice (I am editing before sending), with all data where it belongs. On the third attempt to send mail with the sendObject, it simply skips over that line of code. I have a message being displayed before and after the doCmd line, and they both display for the rest of the table, but no mail is ever sent after the first two email.
Heres the code (from work, so I had to scan it and the sendObject line may not be perfect):
DoCmd.SendObject , "", "", strPOCs, "ncfrost", "", strEmailSub, strEmailMsg & strEmailIssues, All, True, ""
All the code is attached. I'm new to this, so any suggestion for better coding would be much appreciated.
When this is solved, maybe someone can tell me why, when I use a macro to send email using a button on a form/subform displaying exactly the data I want, I can't filter to just the subform data. It always takes the entire table of data and attaches it.
Thanks.
Heres the code (from work, so I had to scan it and the sendObject line may not be perfect):
DoCmd.SendObject , "", "", strPOCs, "ncfrost", "", strEmailSub, strEmailMsg & strEmailIssues, All, True, ""
All the code is attached. I'm new to this, so any suggestion for better coding would be much appreciated.
When this is solved, maybe someone can tell me why, when I use a macro to send email using a button on a form/subform displaying exactly the data I want, I can't filter to just the subform data. It always takes the entire table of data and attaches it.
Thanks.