>I have a regular list box on a form with 8 columns. The code to
>load it is below. This scan loop gets about 60% thru then starts
>slowing down. The first 60% loads fairly quickly, but the remaining
>30 percent take 1 minute or so longer. There are 3000 records
>in the table.
>
>Anyone know whats going on?
>
>
>SELECT Resh
>SCAN
>
> nRow = nRow + 1
>
> cId = TRANSFORM(Resh.Id)
> cStation = ALLTRIM(Resh.StatName)
> cProgram = ALLTRIM(Resh.ProgTitl)
> cClient = ALLTRIM(Resh.ClientId)
> cPhone = ALLTRIM(BkPhone)
> cDateTime = DTOC(BkDate) + " " + BkTime
> cOrdQty = TRANSFORM(basordr)
> cState = ALLTRIM(State)
>
> .lstInfo.AddListItem(cId, nRow, 1)
> .lstInfo.AddListItem(cStation, nRow, 2)
> .lstInfo.AddListItem(cProgram, nRow, 3)
> .lstInfo.AddListItem(cClient, nRow, 4)
> .lstInfo.AddListItem(cPhone, nRow, 5)
> .lstInfo.AddListItem(cDateTime, nRow, 6)
> .lstInfo.AddListItem(cOrdQty, nRow, 7)
> .lstInfo.AddListItem(cState, nRow, 8)
>
>ENDSCAN
>Can you make ListBox RowSource to be an array or cursor instead? AddListItem is used for few items...
If it's not broken, fix it until it is.
My Blog