>You need to loop.
Create a generic function (in a module, not associated with a form), and
call it whenever you need it.
Sub ListboxSelectAll(WhatList As ListBox)
Dim intCurrentRow As Integer
For intCurrentRow = 0 To WhatList.Listcount - 1
WhatList.Selected(intCurrentRow) = True
Next intCurrentRow
End Sub
In your code, you'd use something
Call ListboxSelectAll Me!MyListBox

Signature
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)
> >You need to loop.
>
[quoted text clipped - 7 lines]
> Regards,
> RD
RD - 08 Sep 2005 16:00 GMT
>Create a generic function (in a module, not associated with a form), and
>call it whenever you need it.
[quoted text clipped - 12 lines]
>
> Call ListboxSelectAll Me!MyListBox
Excellent! A new item for my library.
Thanks,
RD