Inserting multiple rows into an email created by VBA

chuckcoleman

Registered User.
Local time
Today, 01:11
Joined
Aug 20, 2010
Messages
377
Hi, I have been using VBA to send an email for several years now. The email is generated from a form where payments are inserted for property lots. Things have changed and I now need to include in the email information how much the payment was for each lot. For instance, owner ID number 21 owns Lot number 445 just paid $600 in addition to paying $300 on lot number 446. Therefore, instead of something relatively simple, I now need to essentially include two or more rows from a query in the email.

Any suggestions on a way to accomplish this?

Chuck
 
I would open a DAO recordset on the query and loop through it, adding to the body within the loop.
 
I would open a DAO recordset on the query and loop through it, adding to the body within the loop.
Thank you. I’ll try your suggestion tomorrow morning.
 
No problem, post back if you get stuck. I have automated apps that do this type of thing.
 
you need to use Outlook automation or CDO, if you don't have the code yet.
 
Here is how I did something similar.
However this takes into account several records for a client, deposits or payments.

Yours could just be the table with the values that I get from each record.

Had to attach as too large to paste.
 

Attachments

I now need to essentially include two or more rows from a query in the email.
How do you add the one line so far?
For ease of use, this would be the interesting place to meet your requirements.
 

Users who are viewing this thread

Back
Top Bottom