I have a listbox on a form that is populated from a table.
I want to be able to select from that list box and populate another listbox. I can do this with code right now, what I cannot do is get the data added to the blank listbox to be saved in a table. I have bound the listbox to a memo field in the table, but no data gets saved.
I tried this another way by using a multiline text box and just added a space and comma after each entry. This worked, but I was unable to add all the items in the original list box. I got an error saying the setting for this property was too long.
Here is the code:
Private Sub cmdSelectAll_Click()
Dim cpyTxt As String
Dim varItm As Variant
For Each varItm In List11.ItemsSelected
cpyTxt = List11.ItemData(varItm)
fld_permissions.SetFocus
fld_permissions.Text = fld_permissions.Text & " " & cpyTxt & ","
Next varItm
End Sub
Any Ideas???
thanks
Mike
I want to be able to select from that list box and populate another listbox. I can do this with code right now, what I cannot do is get the data added to the blank listbox to be saved in a table. I have bound the listbox to a memo field in the table, but no data gets saved.
I tried this another way by using a multiline text box and just added a space and comma after each entry. This worked, but I was unable to add all the items in the original list box. I got an error saying the setting for this property was too long.
Here is the code:
Private Sub cmdSelectAll_Click()
Dim cpyTxt As String
Dim varItm As Variant
For Each varItm In List11.ItemsSelected
cpyTxt = List11.ItemData(varItm)
fld_permissions.SetFocus
fld_permissions.Text = fld_permissions.Text & " " & cpyTxt & ","
Next varItm
End Sub
Any Ideas???
thanks
Mike