Emailing from a distribution List in Lotus Notes
Posted on 2006-11-01
I'm having a problem e-mailing a distribution list given certain criteria. I think it might have to do with my table structure.
I have one table (tblGEFSAll) that has a field called TraningTypeID with the values Automation, General,...
I have another table (tblTraining). This table list all the names, with e-mail addresses. It then has check boxes for training type, eg. Automation, General.....
I want to email individuals that a document is effective that they are required to train on. I'm trying to do this based upon the ApprovedDate field in tblGEFSAll. Something like...when the tblGEFSAll.ApprovedDate = Date and tblGEFSAll.TrainingTypeID = Automation and tblTraining.Automation = True then SendObject.
Is this possible given the structure of my tables?
I tried some code I got from here that I thought might work, but it doesn't work correctly. It's just puts someone’s name in the TO: field.
The e-mail app I'm using is Lotus Notes.
Dim strToList As String
Dim strSQL As String
strSQL = "SELECT tblGEFSAll.Approved, tblGEFSAll.TrainingModuleID FROM tblGEFSAll WHERE (((tblGEFSAll.Approved) _ =Date()) AND ((tblGEFSAll.TrainingModuleID)=54));" '54 = Automation
strToList = CurrentProject.Connection.Execute(strSQL).GetString(2, , "", "; ")
DoCmd.SendObject acSendNoObject, , , strToList, , , "Test", , 0
I'm not quite sure what the CurrentProject.Connection part of this code is doing.