BillieBurgess
Technical User
Hello,
I am using a form to send out report (queries) to multiple accounts limiting the report to records with their account #. The report is in excel format and comes from a query. Everything works find, except my Yes/No fields show up as True/False. My Boss wants Yes/No. The Table format is Yes/No, The Query Format is Yes/No. However, when you open the attachement is says True/False.
The code is as follows:
Dim stDocName1 As String
Dim strEmailAddress As String
Dim strSubject As String
Dim strMessageText As String
Dim strMessageHeader As String
Dim strMessageGreeting As String
Dim strMessageTextLine1 As String
Dim strMessageTextLine2 As String
Dim strMessageTextLineClosing As String
Dim strMessageTextError As String
Dim strRecordCount As String
Dim strEmailAddress1 As String
Dim strEmailAddress2 As String
strEmailAddress1 = "Chip.Yodzis@dowelectronics.com;Rusty.moore2@dowelectronics.com;Ed.Kowalczyk@dowelectronics.com;Phillip.Partain@dowelectronics.com"
With Me.RecordsetClone
While Not .EOF
stDocName = "NoticeDailyAgreementReportDwnloadGroupByDealerAndReport"
strEmailAddress =
strSubject = Format(Now(), "yymmdd") & " DLR " & [DealerAccount] _
& " " & [ReportName] & " Dish Daily Agreement File"
strMessageHeader = "Dealer OE: " & [RETAILEROENO] & Chr(13) & Chr(10) & "Dealer Account: " & [DealerAccount] & Chr(13) & Chr(10) _
& "Current Email Address: " & Nz([Email], "N/A") & Chr(13) & Chr(10) & "Fax Number: " & Nz([FaxNumber], "N/A") & Chr(13) & Chr(10) & "Phone Number: " & [Phone] & Chr(13) & Chr(10) & Chr(13) & Chr(10)
strMessageGreeting = "Dear Dow Retailer"
strMessageTextLine1 = "In an effort to help you monitor your open claim issues, Dow will be forwarding data every business day (in the form of a excel attachment) on agreements that had activity during the previous twenty-four hour period. While this is not a summary of all open claims on your account, this information will allow you to see the last known status of any claim on your account that was reviewed, modified, or closed within the Echo Agreement Reporting system for the previous day ."
strMessageTextError = Nz(Err.Description, " ")
strMessageClosing = Chr(13) & Chr(10) & Chr(13) & Chr(10) & "Dow Electronics"
strRecordCount = [CountOfAGREEMENTID]
strMessageText = strMessageHeader & Chr(13) & Chr(10) & strMessageGreeting & Chr(13) & Chr(10) & strMessageTextLine1 _
& strMessageClosing & Chr(13) & Chr(10) & Chr(13) & Chr(10) & strMessageTextError & Chr(13) & Chr(10) & "Record Count: " & strRecordCount
DoCmd.SendObject acSendQuery, stDocName, acFormatXLS, strEmailAddress1, , , strSubject, strMessageText, True
.MoveNext
Me.Bookmark = .Bookmark
Wend
End With
I am using a form to send out report (queries) to multiple accounts limiting the report to records with their account #. The report is in excel format and comes from a query. Everything works find, except my Yes/No fields show up as True/False. My Boss wants Yes/No. The Table format is Yes/No, The Query Format is Yes/No. However, when you open the attachement is says True/False.
The code is as follows:
Dim stDocName1 As String
Dim strEmailAddress As String
Dim strSubject As String
Dim strMessageText As String
Dim strMessageHeader As String
Dim strMessageGreeting As String
Dim strMessageTextLine1 As String
Dim strMessageTextLine2 As String
Dim strMessageTextLineClosing As String
Dim strMessageTextError As String
Dim strRecordCount As String
Dim strEmailAddress1 As String
Dim strEmailAddress2 As String
strEmailAddress1 = "Chip.Yodzis@dowelectronics.com;Rusty.moore2@dowelectronics.com;Ed.Kowalczyk@dowelectronics.com;Phillip.Partain@dowelectronics.com"
With Me.RecordsetClone
While Not .EOF
stDocName = "NoticeDailyAgreementReportDwnloadGroupByDealerAndReport"
strEmailAddress =
strSubject = Format(Now(), "yymmdd") & " DLR " & [DealerAccount] _
& " " & [ReportName] & " Dish Daily Agreement File"
strMessageHeader = "Dealer OE: " & [RETAILEROENO] & Chr(13) & Chr(10) & "Dealer Account: " & [DealerAccount] & Chr(13) & Chr(10) _
& "Current Email Address: " & Nz([Email], "N/A") & Chr(13) & Chr(10) & "Fax Number: " & Nz([FaxNumber], "N/A") & Chr(13) & Chr(10) & "Phone Number: " & [Phone] & Chr(13) & Chr(10) & Chr(13) & Chr(10)
strMessageGreeting = "Dear Dow Retailer"
strMessageTextLine1 = "In an effort to help you monitor your open claim issues, Dow will be forwarding data every business day (in the form of a excel attachment) on agreements that had activity during the previous twenty-four hour period. While this is not a summary of all open claims on your account, this information will allow you to see the last known status of any claim on your account that was reviewed, modified, or closed within the Echo Agreement Reporting system for the previous day ."
strMessageTextError = Nz(Err.Description, " ")
strMessageClosing = Chr(13) & Chr(10) & Chr(13) & Chr(10) & "Dow Electronics"
strRecordCount = [CountOfAGREEMENTID]
strMessageText = strMessageHeader & Chr(13) & Chr(10) & strMessageGreeting & Chr(13) & Chr(10) & strMessageTextLine1 _
& strMessageClosing & Chr(13) & Chr(10) & Chr(13) & Chr(10) & strMessageTextError & Chr(13) & Chr(10) & "Record Count: " & strRecordCount
DoCmd.SendObject acSendQuery, stDocName, acFormatXLS, strEmailAddress1, , , strSubject, strMessageText, True
.MoveNext
Me.Bookmark = .Bookmark
Wend
End With