F
FrankC
I have a list box using multi select that appends the selected items to a
table ‘HoldProsList’.
The form is ‘fSelectPCPlan’ and the control is ‘SelectPC’ and the bound
column is an integer.
It works fine when the Multi Select property is set to ‘Simple’ but not when
it is ‘Extended’.
The flow jumps to the end after the ‘For each…. ‘ statement. (No errors)
The code is:
' Copy the ProspectID's into the HoldProsList table
Dim frm As Form
Dim ctl As Control
Dim varItm As Variant
Set rs = DBEngine(0)(0).OpenRecordset("HoldProsList", dbOpenDynaset,
dbAppendOnly)
Set frm = Forms![fSelectPCPlan]
Set ctl = frm!SelectPC
For Each varItm In ctl.ItemsSelected
rs.AddNew
rs![ProspectID] = Me.SelectPC.ItemData(varItm)
rs.Update
Next varItm
table ‘HoldProsList’.
The form is ‘fSelectPCPlan’ and the control is ‘SelectPC’ and the bound
column is an integer.
It works fine when the Multi Select property is set to ‘Simple’ but not when
it is ‘Extended’.
The flow jumps to the end after the ‘For each…. ‘ statement. (No errors)
The code is:
' Copy the ProspectID's into the HoldProsList table
Dim frm As Form
Dim ctl As Control
Dim varItm As Variant
Set rs = DBEngine(0)(0).OpenRecordset("HoldProsList", dbOpenDynaset,
dbAppendOnly)
Set frm = Forms![fSelectPCPlan]
Set ctl = frm!SelectPC
For Each varItm In ctl.ItemsSelected
rs.AddNew
rs![ProspectID] = Me.SelectPC.ItemData(varItm)
rs.Update
Next varItm