G
Guest
I have a form with several listboxes each allowing multi-select.
The form allows all of these selections to be saved under a name (to a
special table) and also retrieved from the table.
This seems to work but the problem is that when they retrieve the settings
and I update the various '.selected' values, the listboxes dont show the
selections. I tried doing repaint, refresh and requery but nothing works.
What do I have to do to get them to show up? Here is my code to reload one
listbox:
Public Sub IncCat(strName As String)
Dim i As Integer
With Me!lstIncCats
For i = 0 To .ListCount - 1
If .ItemData(i) = strName Then
.Selected(i) = True
End If
Next
.Requery
End With
End Sub
The form allows all of these selections to be saved under a name (to a
special table) and also retrieved from the table.
This seems to work but the problem is that when they retrieve the settings
and I update the various '.selected' values, the listboxes dont show the
selections. I tried doing repaint, refresh and requery but nothing works.
What do I have to do to get them to show up? Here is my code to reload one
listbox:
Public Sub IncCat(strName As String)
Dim i As Integer
With Me!lstIncCats
For i = 0 To .ListCount - 1
If .ItemData(i) = strName Then
.Selected(i) = True
End If
Next
.Requery
End With
End Sub