Confirmation Email

Hi all,
I want to be able to send out shipment confirmation emails at the end of the 
day, based on a query that populates with the records that meet some 
specified criteria.  Any record that shows in this query result set will need 
to have an email sent to the customer on record.  I am having the hardest 
time locating some code snipets that I could experiment with.  How would I be 
able to have it go through each record and send an email?  Any help, 
guidance, or code would be greatly appreciated. Thanks!
-gary
0
Utf
11/7/2007 12:12:00 AM
access.formscoding 7493 articles. 0 followers. Follow

1 Replies
1668 Views

Similar Articles

[PageSpeed] 9

Try something like

    Dim rst As DAO.Recordset
    Set rst = CurrentDb.OpenRecordset("YourQueryName")
    If rst.RecordCount > 0 Then 'ensure there is data
        rst.MoveFirst  'goto the 1st recordset
        Do Until rst.EOF  'End of file
           'Send your e-mail Here
           '
           '
           rst.MoveNext
        Loop
    Else
        MsgBox "No Query Results To Process!", vbInformation
    End If
-- 
Hope this helps,

Daniel P





"Gary Dolliver" wrote:

> Hi all,
> I want to be able to send out shipment confirmation emails at the end of the 
> day, based on a query that populates with the records that meet some 
> specified criteria.  Any record that shows in this query result set will need 
> to have an email sent to the customer on record.  I am having the hardest 
> time locating some code snipets that I could experiment with.  How would I be 
> able to have it go through each record and send an email?  Any help, 
> guidance, or code would be greatly appreciated. Thanks!
> -gary
0
Utf
11/7/2007 2:17:00 AM
Reply:

Similar Artilces: