annmariebette
Instructor
Help! If anyone out there can give me an idea of how to do this I would GREATLY appreciate it! I have a form in Access (2000) that has a button on it. When clicked I execute a Visual Basic event that basically prints a single record from the form in a report (preview mode). The VB code next runs a macro that basically executes the SendTo action which Opens Outlook and transmits the report as an attachment. What I need to do is figure out a way of getting the email address (which I know from both the form and report) and automatically have it populated to "send" to the email recepient. Here's what my event code looks like that's attached to the button on my form:
Private Sub cmdPrintRecord_Click()
Dim strReportName As String
Dim strCriteria As String
strReportName = "rptInstructorTEST"
strCriteria = "[InstructorID]=" & Me![InstructorId] & ""
DoCmd.OpenReport strReportName, acViewPreview, , strCriteria
Dim strDocName As String
Dim strEmail As String
strDocName = "mcrTransmitToOutlook"
strEmail = ""
DoCmd.RunMacro strDocName
End Sub
The macro TransmitToOutlook" basically launches outlook and as I mentioned above attaches the report as an email attachment. What I want to do is take the email address and have it automatically populated in the TO: field in Outlook and if possible send the email.
I am DESPARATE!
THanks so much,
Ann Marie
Private Sub cmdPrintRecord_Click()
Dim strReportName As String
Dim strCriteria As String
strReportName = "rptInstructorTEST"
strCriteria = "[InstructorID]=" & Me![InstructorId] & ""
DoCmd.OpenReport strReportName, acViewPreview, , strCriteria
Dim strDocName As String
Dim strEmail As String
strDocName = "mcrTransmitToOutlook"
strEmail = ""
DoCmd.RunMacro strDocName
End Sub
The macro TransmitToOutlook" basically launches outlook and as I mentioned above attaches the report as an email attachment. What I want to do is take the email address and have it automatically populated in the TO: field in Outlook and if possible send the email.
I am DESPARATE!
THanks so much,
Ann Marie