S
Stephanie
Greetings! I have code that loops through my db to create a DoCmd.SendObject
email list based on a query. However, I can't figure out how to address the
DateDiff input paramater required by the query, READRegExpEmail:
Months since Expiration:
DateDiff("m",Max([RegREADResults].[RegREADDate]),[Reference date for
Registration: (MM/DD/YY)],True)
The looped code:
Private Sub RegExp_Click()
Dim rst As DAO.Recordset
Dim strTo As String
Set rst = CurrentDb.OpenRecordset("SELECT [EmailName] FROM
READRegExpEmail")
With rst
Do Until .EOF
strTo = strTo & ![EmailName] & ";"
.MoveNext
Loop
.Close
End With
strTo = Left(strTo, Len(strTo) - 1)
Set rst = Nothing
'line that would open Outlook to a new message with the bcc:
'box populated with the list you built in strTo
DoCmd.SendObject acSendNoObject, , , , , strTo, "R.E.A.D. registration
overdue"
End Sub
I appreciate help in incorporating the query parameter into the form code.
Thanks.
email list based on a query. However, I can't figure out how to address the
DateDiff input paramater required by the query, READRegExpEmail:
Months since Expiration:
DateDiff("m",Max([RegREADResults].[RegREADDate]),[Reference date for
Registration: (MM/DD/YY)],True)
The looped code:
Private Sub RegExp_Click()
Dim rst As DAO.Recordset
Dim strTo As String
Set rst = CurrentDb.OpenRecordset("SELECT [EmailName] FROM
READRegExpEmail")
With rst
Do Until .EOF
strTo = strTo & ![EmailName] & ";"
.MoveNext
Loop
.Close
End With
strTo = Left(strTo, Len(strTo) - 1)
Set rst = Nothing
'line that would open Outlook to a new message with the bcc:
'box populated with the list you built in strTo
DoCmd.SendObject acSendNoObject, , , , , strTo, "R.E.A.D. registration
overdue"
End Sub
I appreciate help in incorporating the query parameter into the form code.
Thanks.