I'm using Access 2003.
I have a List Box which I populate by selecting items from a drop down Combo Box. I now want to delete from the List Box only the selected, but not necessarily sequencial items (either one at a time or several).
I found some code at this website:
The author suggests creating a Text Box, then first temporarily storing the text that is selected in the List Box as follows:
Then, by use of the following code, the text present in the Text Box is used to search the List Box, and the corresponding text is deleted:
The first bit works fine, i.e. the text selected in the List Box appears in the Text Box, but I have no luck when I choose to delete this text from the List Box.
My understanding is that this method would also only work for one line of text, and not multiple selections.
Any suggestions would be helpful.
I have a List Box which I populate by selecting items from a drop down Combo Box. I now want to delete from the List Box only the selected, but not necessarily sequencial items (either one at a time or several).
I found some code at this website:
The author suggests creating a Text Box, then first temporarily storing the text that is selected in the List Box as follows:
Code:
MyText = MyList.ItemData(MyList.ListIndex)
Code:
Dim S As String S = MyText & ";" MyList.RowSource = Replace(MyList.RowSource, S, "")
My understanding is that this method would also only work for one line of text, and not multiple selections.
Any suggestions would be helpful.
Comment