Hi
I am using the following code, and basically what I want it to do is this:
User selects a Business Unit from drop down list, they then click on a button and it creates a report based on the the business unit selected from the drop down list.
It converts the reoprt to RTF and then fires up a new email, but it picks the first change champion form the table and not the query from the drop down list, any ideas
Dim stDocName As String
Dim stMailList As String
Dim stCCMailList As String
Dim stHeader As String
Dim stMessageBody As String
Dim stSROD As Date
stDocName = "Rpt Deployment Feedback"
stMailList = "steve duncan"
While TempStore <> Me.[Business Unit Name]
DoCmd.GoToRecor d , , acNext
Wend
stCCMailList = Me.[Change Champion]
stSROD = Me![Scheduled Roll out date]
stHeader = "XP Phase2 Feedback Form: " & Trim(Me![Business Unit Name]) & " : " & stSROD
stMessageBody = "Please see attached XP Phase 2 Feedback Form, could you complete and return. " & Chr(10)
stMessageBody = stMessageBody & stSROD & " in Business Unit: " & Trim(Me![Business Unit Name]) & "." & Chr(10) & Chr(10)
DoCmd.SendObjec t acSendReport, stDocName, acFormatRTF, stMailList, stCCMailList, "", stHeader, stMessageBody, False
I am using the following code, and basically what I want it to do is this:
User selects a Business Unit from drop down list, they then click on a button and it creates a report based on the the business unit selected from the drop down list.
It converts the reoprt to RTF and then fires up a new email, but it picks the first change champion form the table and not the query from the drop down list, any ideas
Dim stDocName As String
Dim stMailList As String
Dim stCCMailList As String
Dim stHeader As String
Dim stMessageBody As String
Dim stSROD As Date
stDocName = "Rpt Deployment Feedback"
stMailList = "steve duncan"
While TempStore <> Me.[Business Unit Name]
DoCmd.GoToRecor d , , acNext
Wend
stCCMailList = Me.[Change Champion]
stSROD = Me![Scheduled Roll out date]
stHeader = "XP Phase2 Feedback Form: " & Trim(Me![Business Unit Name]) & " : " & stSROD
stMessageBody = "Please see attached XP Phase 2 Feedback Form, could you complete and return. " & Chr(10)
stMessageBody = stMessageBody & stSROD & " in Business Unit: " & Trim(Me![Business Unit Name]) & "." & Chr(10) & Chr(10)
DoCmd.SendObjec t acSendReport, stDocName, acFormatRTF, stMailList, stCCMailList, "", stHeader, stMessageBody, False
Comment