Access_Help
Registered User.
- Local time
- Today, 06:53
- Joined
- Feb 12, 2005
- Messages
- 136
The following script is being used to add two items from the listbox into a table using the double click event. I am faced with: 3265: item not found in this collection
I am using a pre-written script and modifying it to the best of my VB knowledge
The two field names are: Session and Initials
In the list box they are in the first (0) and 3rd columns (2) - how do I extract these values only and append them?
I am using a pre-written script and modifying it to the best of my VB knowledge

The two field names are: Session and Initials
In the list box they are in the first (0) and 3rd columns (2) - how do I extract these values only and append them?
Private Sub List41_DblClick(Cancel As Integer)
Dim rst As DAO.Recordset
Dim varItm As Variant
Set rst = CurrentDb.OpenRecordset("tbl_assignSessions", dbOpenDynaset)
For Each varItm In List41.ItemsSelected
PP_EDIT = List41.ItemData(varItm)
With rst
.AddNew
.Fields("Session, Initials") = PP_EDIT
.Update
End With
Next varItm
rst.Close
Set rst = Nothing
End Sub