My Assistant
![]() ![]() |
|
|
Dec 5 2007, 05:50 PM
Post
#1
|
|
|
UtterAccess Member Posts: 37 |
Hi, is there a quick way to clear a listbox w/value list? I see how to use removeitem on a selected item but how can I just quickly clear it?
Thanks! |
|
|
|
Dec 5 2007, 05:57 PM
Post
#2
|
|
|
Retired Moderator Posts: 37,716 From: The San Francisco Bay Area |
Me.ListBoxName.RowSource = ""
I assume you want to remove the values and not just clear the selected items in the list box... hth, Jack |
|
|
|
Dec 5 2007, 05:59 PM
Post
#3
|
|
|
UtterAccess VIP Posts: 4,582 From: From Hawaii - Now in Wisconsin...Am I Nuts? |
If you're trying to clear all the selections on a multi-select list box, you can do the following.
CODE Dim x As Integer
'ABC Code For x = 0 To MyListBox.ListCount - 1 MyListBox.Selected(x) = False Next x |
|
|
|
Dec 5 2007, 06:01 PM
Post
#4
|
|
|
UtterAccess Member Posts: 37 |
Thanks so much! too simple!
|
|
|
|
Dec 5 2007, 06:05 PM
Post
#5
|
|
|
Retired Moderator Posts: 37,716 From: The San Francisco Bay Area |
You are welcome.... I am NOT a fan of value lists, as I prefer to use tables. If, of course, you are building your list box on the fly then you approach may be more advantages...
Jack |
|
|
|
Dec 5 2007, 06:43 PM
Post
#6
|
|
|
UtterAccess VIP Posts: 4,582 From: From Hawaii - Now in Wisconsin...Am I Nuts? |
You're welcome.
|
|
|
|
![]() ![]() |
|
Go to Top · Lo-Fi Version | Time is now: 20th May 2013 - 01:17 AM |