If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
How to clear listbox selection
Win XP, Access 2002. I'm trying to solve a problem with a single column listbox that displays selected values from a table whenever
its RowSource is changed in code. If I select an item so that it is highlighted, then invoke the code to change the RowSource, the box is refilled with no item highlighted. However, if the RowSource is then changed back to what it was when I selected the item, this same item is still highlighted. I'd like to stop this behaviour. Each time the box is repopulated I want nothing to appear selected. Any advice would be appreciated. |
#2
|
|||
|
|||
How to clear listbox selection
"Rob Rutherford" wrote in message
Win XP, Access 2002. I'm trying to solve a problem with a single column listbox that displays selected values from a table whenever its RowSource is changed in code. If I select an item so that it is highlighted, then invoke the code to change the RowSource, the box is refilled with no item highlighted. However, if the RowSource is then changed back to what it was when I selected the item, this same item is still highlighted. I'd like to stop this behaviour. Each time the box is repopulated I want nothing to appear selected. Any advice would be appreciated. If this is not a multi-select list box, try setting the list box's value to Null when you change its rouwsource; e.g., With Me.MyListbox .Value = Null .RowSource = whatever End With -- Dirk Goldgar, MS Access MVP www.datagnostics.com (please reply to the newsgroup) |
#3
|
|||
|
|||
How to clear listbox selection
Many thanks Dirk, it works a treat.
|
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Displaying listbox selection in textbox | steve411 | General Discussion | 1 | June 19th, 2004 07:21 PM |
Combo Box selection disappearing on new record and change of option selection | EmmA | Using Forms | 2 | June 17th, 2004 02:21 AM |
Hide Specific rows. | Steve | Worksheet Functions | 7 | June 9th, 2004 09:27 PM |
word text selection | [email protected] | General Discussion | 3 | May 30th, 2004 10:35 AM |
Clear checkboxes | Jaime Andersen | Worksheet Functions | 1 | December 30th, 2003 07:29 PM |