Ok, I'm partly there. I was able to copy the selected items from the list
box (lst_PM) in the form (Frm_PM) to the text box (T_Reminder_Mailing_List)
in a separate form (TblCompliance_General). I am having two problems:
1. Once I close the form with the text box (TblCompliance_General), the
selected text that was copied from the list box goes away. I need to be able
to save the text in the text box.
2. I have a third form (Tasks Requiring to be scheduled) that runs on a
query and sends emails to the program managers using T_Reminder_Mailing_List
in TblCompliance_General. This will only work if TblCompliance_General is
open. Is there a way to send the emails when TblCompliance_General is
closed? My email code is pasted below:
---------------
Sub SeparateEmails()
On Error GoTo Err_SeparateEmails
Dim strUser As Control
Dim strAct As Control
Forms![Tasks Requiring to be scheduled].Filter = "[AN_AutoNumber] = " &
Me![AN_AutoNumber]
Forms![Tasks Requiring to be scheduled].FilterOn = True
Forms![TblCompliance_General].Filter = "[AN_AutoNumber] = " &
Me![AN_AutoNumber]
Forms![TblCompliance_General].FilterOn = True
DT_Scheduled = Now()
Set strUser = [Form_TblCompliance_General].T_Reminder_Mailing_List
Set strAct = [Form_Tasks Requiring to be scheduled].T_CompAct
DoCmd.SendObject acSendForm, "Tasks Requiring to be scheduled", "HTML
(*.htm; *.html)", strUser, "", "", "Please schedule: " + strAct, "See
attached report for details. Please reply to this message for schedule
confirmation.", True, ""
Forms![Tasks Requiring to be scheduled].Filter = ""
Forms![TblCompliance_General].Filter = ""
Exit_SeparateEmails:
Exit Sub
Err_SeparateEmails:
MsgBox Err.Description
Forms![Tasks Requiring to be scheduled].Filter = ""
Forms![TblCompliance_General].Filter = ""
Resume Exit_SeparateEmails
End Sub