|
|
|||||||||
|
|||||||||
|
|||||||||
| |
||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
SlickEdit: Code in over 40 languages across 7 platforms. SlickEdit’s unmatched power, speed, and flexibility allows even the most accomplished developers to write better code faster. Download a free trial today! |
|
#1
|
|||
|
|||
|
Hi, I have some access vba code that I want to read a recordset, and for each record add another row of information to the body of an email. Is there a way of doing it? I basically want to send one email with a list of numbers in, instead of one email for each record I find.
Set db = CurrentDb SQLstr = "SELECT Audits.[Local Project Reference] fROM Audits WHERE (((Audits.[Target Completion Date])<Date()) AND ((Audits.[Date completed]) Is Null))" Set rst = db.OpenRecordset(SQLstr) If rst.EOF = False Then rst.MoveFirst Do Until rst.EOF 'string audit nums together to put in email body. rst.MoveNext Loop 'call mail Else End If |
|
#2
|
|||
|
|||
|
Sure, as you read through your recordset build the email body in a string variable. Once you've processed the recordset use the variable you created as the body of the email message.
do while not rs.eof mystring = rs("somecolumn") & vbcrlf rs.movenext loop
__________________
====== Doug G ====== I didn't attend the funeral, but I sent a nice letter saying I approved of it. --Mark Twain |
![]() |
| Viewing: ASP Free Forums > Programming > Visual Basic Programming > Stringing Data in a file |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|
|
|