Selecting values in a list box with code

A

Anthony Cravero

Hi all,

I'm using Access 97 and trying to incorporate a "select all" button that
will select all the items in a multi-select list box. Is there a site out
there, or some simple code that I can use to do this?

Thanks,
Anthony
 
R

Rick Brandt

Anthony Cravero said:
Hi all,

I'm using Access 97 and trying to incorporate a "select all" button that
will select all the items in a multi-select list box. Is there a site out
there, or some simple code that I can use to do this?


Dim i As Integer

Do Until i = Me.ListBoxName.ListCount
Me.ListBoxName.Selected(i) = True
i = i + 1
Loop
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top