Phil4tektips
Technical User
Hi all,
I have this code which will eventually email all the users of my database each month, I am in the process of writing it. I would like to put a loop around the section of code below to collect all the entries from a table that I have called "Reported by List".
This table contains all the users names, clock numbers, and email addresses. Can I loop through this table to output all the clock numbers to the string "strClockNo"?
Code:
strClockNo = "s02506"
strEmail = DLookup("", "[Reported by _
List]", "[Clock Number] = '" & strClockNo & "'")
'MsgBox "'" & strEmail & "'", vbCritical, "Tester!"
stDocName = "Generic Report"
'DoCmd.OpenReport stDocName, acPreview
DoCmd.SendObject acSendReport, stDocName, acFormatSNP, _
strEmail, , , "Summary of your Records for _
month)", "This is an automated monthly email direct _
from QRRT - Thankyou."
Thanks for any help in advance.....how do you post in a code window in this forum? It looks much neater than above!
~Phil4tektips~
Grant us peace in our days work!
I have this code which will eventually email all the users of my database each month, I am in the process of writing it. I would like to put a loop around the section of code below to collect all the entries from a table that I have called "Reported by List".
This table contains all the users names, clock numbers, and email addresses. Can I loop through this table to output all the clock numbers to the string "strClockNo"?
Code:
strClockNo = "s02506"
strEmail = DLookup("", "[Reported by _
List]", "[Clock Number] = '" & strClockNo & "'")
'MsgBox "'" & strEmail & "'", vbCritical, "Tester!"
stDocName = "Generic Report"
'DoCmd.OpenReport stDocName, acPreview
DoCmd.SendObject acSendReport, stDocName, acFormatSNP, _
strEmail, , , "Summary of your Records for _
month)", "This is an automated monthly email direct _
from QRRT - Thankyou."
Thanks for any help in advance.....how do you post in a code window in this forum? It looks much neater than above!
~Phil4tektips~
Grant us peace in our days work!