Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

List Box Select All

Status
Not open for further replies.

Uriel365

Programmer
Dec 18, 2001
37
GB
Is it possible to have an option to Select All the items in a list box. Iknow this can be done in VB but the list box in Access(XP)does not seem to support this function.

Many thanks in advance

Paul
 
You can put a button next to the listbox with a caption of Select All and put the following code in the On Click event procedure:
Dim I As Long
For I = 0 To Me.ListBoxName.ListCount Step 1
Me.ListBoxName.Selected(I) = True
Next I

You also must select either Simple or Extended in the List Box property Multi Select. Let me know if this will work for you. Bob Scriver
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top