Advertisement
Advertisement
| 07.18.2008 at 10:22AM PDT, ID: 23577548 |
|
[x]
Attachment Details
|
||
|
[x]
The Solution Rating System
|
||
|
With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.
Your Input Matters If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support. Thank you! |
||
1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: 22: 23: 24: 25: 26: 27: 28: 29: 30: 31: 32: 33: 34: 35: 36: 37: 38: 39: |
Public Function SendAutoEmails() As Boolean
Dim rs As DAO.Recordset
Dim db As Database
Dim MyString As String
Dim x As Integer
On Error GoTo SMError
'Opens recordset, reads all the emails note this query reads the values from the field called EmailAddr, table tblEmails
Set db = Currentdb
Set rs = db.OpenRecordset("SELECT EMail_Address FROM qryStatusRptEmailLst")
'Goes through the list of records returned by the above call
MyString = ""
Do While Not rs.EOF
MyString = rs!EMail_Address
MyString = MyString & ";"
MyString = Left(MyString, Len(MyString) - 1)
rs.MoveNext
Loop
'Send to email address read from the database (field is rs!EmailAddr)
'Subject is Auto Send
'Body Text is "This is a test of an auto send"
'Read next record
DoCmd.SendObject acSendQuery, "qryStatusrpt", acFormatXLS, _
MyString, , , "Emergent Work - Task Status Change Notification", _
"Please review the attached document for changes to the Emergent Work you requested.", _
False
'Close and clear all
rs.Close
Set rs = Nothing
Set db = Nothing
SendAutoEmails = True
Exit Function
SMError:
MsgBox "A problem occurred." & vbCrLf & Err.Description, vbCritical, _
"Send Auto EMails"
SendAutoEmails = False
End Function
|