1 Attachment(s)
[RESOLVED] show value in the listbox
I use 2 listbox. One listbox show the field names and another listbox show the values.It work and show me the value for that field if only one field name is selected from listbox1.It.[CODE]But when more then one field name is selected from listbox1, It show me only one value in the listbox2. It suppose show me 3 difference value for difference field name.Why it show me only one value despite I have selected three field name from the listbox1 ?
Code:
If List1.ListIndex > 0 Then
For j = 0 To List1.ListCount - 1
If List1.Selected(j) = True Then
List2.AddItem fld.Name & ": " & fld.ValueAsString
End If
Next j
End If
Re: show value in the listbox
List2.AddItem List1.List(List1.ListIndex)
instead of
List2.AddItem fld.Name & ": " & fld.ValueAsString
Re: show value in the listbox
you need to find the correct record to return the field name & value for each item selected