VFP8? Last parameter is flag, to return row.
m.nameselected = ASCAN(accuname,"Maynard Abernathy",1,-1,-1,8)
>I seem to be having difficulties with ASCAN() today. I have two arrays:
>
>*--Original array
>accuname(1,1) Michael Jones
>accuname(1,2) 7079382
>accuname(2,1) Maynard Abernathy
>accuname(2,2) 3838329
>
>*--Sorted array
>namesort(1,1) Maynard Abernathy
>namesort(1,2) 3838329
>namesort(2,1) Michael Jones
>namesort(2,2) 7079382
>
>The user selects an item in the namesort array from a listbox. For instance, if the user chose 'Maynard Abernathy' then m.nameselected would equal 1. If the user chose 'Michael Jones' then m.nameselected would equal 2, etc. Let's say he chose listindex #1 (Maynard). I then issue:
>
>m.nameselected = ASCAN(accuname,namesort(m.nameselected,1))
>
>which is returning the element in the accuname array (3) and I need it to return the row in the accuname array (2).
>
>Any ideas?
>
>m.nameselected = 2
Steve Gibson