Select naw.fullname, naw.ID from NAW where substring(fullname,1) = ? m.lcLetter into array aNames[10.2]>>this works fine, however, when there is not enough data to populate 10 fields the remaing are shown in the listbox as .F., how should I change to avoid this, prefer to show [ ] (nothing)
>Local array laCheck1[300,100], laCheck2[1] >Select * from (_samples+'data\customer') into array laCheck1 >Select * from (_samples+'data\customer') into array laCheck2 > >? Alen(laCheck1,1), Alen(laCheck1,2) >? Alen(laCheck2,1), Alen(laCheck2,2) >>
>Select top 10 fullname, ID from NAW where fullname like ?m.lcLetter + '%' order by 1 into cursor crsMyNames >>
>Select * From (_samples+"data\customer") Into Cursor NAW nofilter > >Public oForm >oForm = Createobject('MyForm') >oForm.Show() > >Define Class MyForm As Form > Add Object myList As ListBox With Top = 10, Left=10, Height = 200 > > Procedure myList.Init > Local lcLetter > lcLetter = 'B' > > This.RowSourceType=3 > TEXT to this.RowSource pretext 1+2+4+8 noshow >Select top 10 Company, Cust_id >from NAW >where Company like ?m.lcLetter + '%' >order by 1 >into cursor crsMyNames > ENDTEXT > > Endproc >Enddefine >>
Select naw.fullname, naw.ID from NAW where substring(fullname,1) = ? m.lcLetter into array aNames[10.2]it should read:
Select naw.fullname, naw.ID from NAW where substring(fullname,1) = ? m.lcLetter into array aNameswill now proceed however with your suggested cursor approach.