F
Frank Johnson
I am writing a small emailer for a retail application in access.
Anyways, using the OpenRecordSet I can send emails to an entire table or
query.
Example
'strSQL = "SELECT * FROM [main data]"
'Set rec = CurrentDb().OpenRecordset(strSQL)
'rec.MoveFirst
' DoCmd.SetWarnings False
'Do While rec.EOF = False
' DoCmd.SendObject acSendNoObject, , acFormatText, rec!Email, ,
, "This is the subject", "This is my message to you, you filthy
animal.", False
' strEmail = strEmail & rec!Email & ";"
' rec.MoveNext
'Loop
But what I would like to do, is open a query of my choosing and filter
it using the gui interface. Now, I would like to go to my email form and
select the open query which I have already queried on and use that data
for the email. Is this possible?
I could make the query a static name, but what would be the command to
set the CurrentDB to a currently opened filtered query?
Thanks
Anyways, using the OpenRecordSet I can send emails to an entire table or
query.
Example
'strSQL = "SELECT * FROM [main data]"
'Set rec = CurrentDb().OpenRecordset(strSQL)
'rec.MoveFirst
' DoCmd.SetWarnings False
'Do While rec.EOF = False
' DoCmd.SendObject acSendNoObject, , acFormatText, rec!Email, ,
, "This is the subject", "This is my message to you, you filthy
animal.", False
' strEmail = strEmail & rec!Email & ";"
' rec.MoveNext
'Loop
But what I would like to do, is open a query of my choosing and filter
it using the gui interface. Now, I would like to go to my email form and
select the open query which I have already queried on and use that data
for the email. Is this possible?
I could make the query a static name, but what would be the command to
set the CurrentDB to a currently opened filtered query?
Thanks