&lcCursor..Benefit WITH GrpsPlansCarrs.CovDesc8
(2) BetterIF SEEK(&lcCursor..GrpID+&lcCursor..PlanKey, "GrpsPlansCarrs", "Full_Key") REPLACE CarrID WITH GrpsPlansCarrs.Carr, ; Benefit WITH GrpsPlansCarrs.CovDesc8 ; in (m.lcCursor)>I just can't get FoxPro to go my way on this, so I must be wrong in my approach. In the following code, I loop through 12 cursors, each representing a month of the year. I then look for a combined key to find a record in another cursor that is indexed, with an INDEX TAG called FULL_KEY (GrpID+PlanKey). In the SEEK() below, this part won't compile, and it is obviously because I am referencing the cursor and its fields incorrectly, as in: IF SEEK((lcCursor).GrpID+(lcCursor).PlanKey, "GrpsPlansCarrs", "Full_Key")
>FOR nMonth = 1 TO 12 > lcMonth = PADL(nMonth, 2, "0") > * Get the Carrier ID (Matches GrpID and PlanKey) > * and the Benefit Name (Matches PlanKey). > lcCursor=("tmpNearly"+lcMonth) > SELECT (lcCursor) > SCAN > IF SEEK((lcCursor).GrpID+(lcCursor).PlanKey, "GrpsPlansCarrs", "Full_Key") > REPLACE (lcCursor).CarrID WITH GrpsPlansCarrs.Carr, ; > (lcCursor).Benefit WITH GrpsPlansCarrs.CovDesc8 > ENDIF > ENDSCAN >ENDFOR >>
>IF SEEK((lcCursor)+".GrpID"+(lcCursor)+".PlanKey", "GrpsPlansCarrs", "Full_Key") > REPLACE (lcCursor)+".CarrID" WITH GrpsPlansCarrs.Carr, ; > (lcCursor)+".Benefit" WITH GrpsPlansCarrs.CovDesc8 >