M
MSU Sptn
I have a multi select listbox that updates a table (TblCompliance) with the
selected emails in the list. The code for this is below:
----------------
Private Sub Cmd_SaveExit_Click()
On Error GoTo Err_Cmd_SaveExit_Click
Dim db As DAO.Database, rs As DAO.Recordset
Dim var As Variant
Dim strEmails As String
For Each var In Me.lstProgram_Manager.ItemsSelected
strEmails = strEmails & Me.lstProgram_Manager.Column(1, var) & ";"
Next var
CurrentDb.Execute "UPDATE TblCompliance SET T_Reminder_Mailing_List='" &
strEmails & "' WHERE AN_AutoNumber = " & Me!txtAN_AutoNumber
------------------
This works fine, but I also have a query set up to return all recordsets for
which the email field (T_Reminder_Mailing_List) of TblCompliance is null.
When the listbox is cleared then the Save & Exit command button is clicked
the T_Reminder_Mailing_List field in TblCompliance is blank, but the
recordset is not returned by the query as having a null
T_Reminder_Mailing_List field. Any ideas?
selected emails in the list. The code for this is below:
----------------
Private Sub Cmd_SaveExit_Click()
On Error GoTo Err_Cmd_SaveExit_Click
Dim db As DAO.Database, rs As DAO.Recordset
Dim var As Variant
Dim strEmails As String
For Each var In Me.lstProgram_Manager.ItemsSelected
strEmails = strEmails & Me.lstProgram_Manager.Column(1, var) & ";"
Next var
CurrentDb.Execute "UPDATE TblCompliance SET T_Reminder_Mailing_List='" &
strEmails & "' WHERE AN_AutoNumber = " & Me!txtAN_AutoNumber
------------------
This works fine, but I also have a query set up to return all recordsets for
which the email field (T_Reminder_Mailing_List) of TblCompliance is null.
When the listbox is cleared then the Save & Exit command button is clicked
the T_Reminder_Mailing_List field in TblCompliance is blank, but the
recordset is not returned by the query as having a null
T_Reminder_Mailing_List field. Any ideas?