[AccessD] Listbox question

Gustav Brock gustav at cactus.dk
Mon May 26 10:31:19 CDT 2003


Hi Arthur

> Love this list! A dozen solutions in a few minutes! Makes me look like I
> know what I'm doing :-) My rates are high because I'm an army of coders....

Hey, they all forgot to watch for the property ColumnHeads which adds
one to ListCount and removes ListIndex 0 from your list of usable list
values.

I use Abs(lst.ColumnHeads) to compensate for this like:

   With Me.List0
     For x = Abs(.ColumnHeads) To .ListCount - 1
       .Selected(x) = True
     Next x
   End With

Yes, I know you "never" use column heads ...

/gustav


> -----Original Message-----
> From: accessd-bounces at databaseadvisors.com
> [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Bruce Bruen
> Sent: May 26, 2003 10:10 AM
> To: accessd at databaseadvisors.com
> Subject: RE: [AccessD] Listbox question

> Dim x As Integer
>     With Me.List0
>         For x = 1 To .ListCount
>             .Selected(x - 1) = True
>         Next x
>     End With



More information about the AccessD mailing list