Multi Select List Box in Access

Joined
Jul 1, 2015
Messages
1
Reaction score
0
I have a multi select list box in Access
what I want to achieve is
1. step 1 the user selects one value from list box and clicks a button "Choose"
2. the selected value from the list box is passed to a text box eg. tf1
3. user selects another value from the list box and clicks the choose
4. this value should be passed to another text box tf2.
5. and so on a user should be able to select 20 different values from the list box and pass it to 20 different text boxes

I am stuck because I am new to VBA coding and my loop code is not working...any help is greatly appreciated
Thanks in advance
Here is my code...


Private Sub Command190_Click()

Dim db As Database
Dim rs As Recordset

'Set db = CurrentDb()
Set rs = db.OpenRecordset("tblUsers")
For Each itm In List129.ItemsSelected
rs.AddNew
rs!Description = tf1.ItemData(itm)
rs!Day = itm
rs.Update
Next
rs.close
Set rs = Nothing
Set db = Nothing
End Sub
 
Back
Top