>I have two records in the list1
>
>485
>495
>
>for n = 1 to thisform.pageframe1.page3.list1.listcount
>
> col1 = thisform.pageframe1.page3.list1.listitem(n, 1)
>
> select proj_no,projname from abc where proj_no = col1
>
>endfor
>
>I want to store all the records to the list2 which comes from the select query when used
>in this example i get 3 recs for proj_no 485 and 4 recs for proj_no 495
>I want to show all the 7 recs in the list2 could you please tell me how should i handle it after firing the for loop.
>
>Thank you very much.
I would go about it this way
create cursor cuList2 (proj_no, projname)
for n = 1 to thisform.pageframe1.page3.list1.listcount
col1 = thisform.pageframe1.page3.list1.listitem(n, 1)
select proj_no,projname from abc where proj_no = col1 into cursor temp
select cuList2
append from dbf("temp")
use in select("temp")
endfor
Tracy