I have a query called qryExceptions which holds records off all errors within a table. This has to be mailed out to the person who submitted that record.
From this query, I have created another query which looks up the users from qryExceptions and exracts their email address. This query is called qryMailingList.
I need to write code where it opens up qryMailingList and starting with the first record it looks up the user name and goes to qryExceptions and filters on that username and saves the output as an Excel or Text file and sends a mail to the user (using the field eMail Address in qryMailing List). I want the code to go through each record in qryMailingList till EOF.
I am quite new to VB. From past postings I have figured out how to open the recordset and DO While Not qryMailingList.EOF - I just don't know hoe to put the whole thing together.
Any help would be very much appreciated.
From this query, I have created another query which looks up the users from qryExceptions and exracts their email address. This query is called qryMailingList.
I need to write code where it opens up qryMailingList and starting with the first record it looks up the user name and goes to qryExceptions and filters on that username and saves the output as an Excel or Text file and sends a mail to the user (using the field eMail Address in qryMailing List). I want the code to go through each record in qryMailingList till EOF.
I am quite new to VB. From past postings I have figured out how to open the recordset and DO While Not qryMailingList.EOF - I just don't know hoe to put the whole thing together.
Any help would be very much appreciated.