S
snappl3
Below is the code i have to automate pulling an e-mail from a query. However
there seems to be something wrong w/ it. I'm pretty new to the whole
programming thing, so any help would be greatly appreciated. Thanks in
advance.
Sub Checklist()
Dim rs As DAO.Recordset
Set rs = CurrentDb.OpenRecordset("qryClientEmails")
With rs
Do Until .EOF
If Len(rs!Email & vbNullString) > 0 Then
DoCmd.SendObject _
To:=rs![Queries]![ClientEmails]![Contact E-mail], _
Subject:="Johnson & Johnson Supplier Checklist", _
MessageText:="Message Text"
End If
..MoveNext
Loop
..Close
End With
Set rs = Nothing
End Sub
there seems to be something wrong w/ it. I'm pretty new to the whole
programming thing, so any help would be greatly appreciated. Thanks in
advance.
Sub Checklist()
Dim rs As DAO.Recordset
Set rs = CurrentDb.OpenRecordset("qryClientEmails")
With rs
Do Until .EOF
If Len(rs!Email & vbNullString) > 0 Then
DoCmd.SendObject _
To:=rs![Queries]![ClientEmails]![Contact E-mail], _
Subject:="Johnson & Johnson Supplier Checklist", _
MessageText:="Message Text"
End If
..MoveNext
Loop
..Close
End With
Set rs = Nothing
End Sub