>>I would add three variables
>>
>>local lcPassFail, lcJobHist, lcItemHist
>>
>>select Inspection
>>scan
>> lcPassFail = thisform.zpassfail()
>> lcJobHist = thisform.zjobhist(inspection.jobnum, inspection.itemnum)
>> lcItemHist = thisform.zitemhist(inspection.jobnum, inspection.itemnum)
>>
>> replace passFail with m.lcPassFail, ;
>> JobHist with m.lcJobHist, ItemHist with m.lcItemHist
>>endscan
>>
>>Of course, these three functions have to be reviewed as well.
>
>OR
>
>replace ALL passFail with thisform.zpassfail(), ;
>JobHist with thisform.zjobhist(inspection.jobnum, inspection.itemnum), ;
>ItemHist with thisform.zitemhist(inspection.jobnum, inspection.itemnum) ;
>IN Inspection
>
>No SCAN...ENDSCAN, no assignment of memvars.
>
>If zpassfail etc. were functions and not methods it would run faster too.
We don't know what these methods are doing. May be they are moving the record pointer or something along the lines. In general I would agree with you, but just to be on the safe side I made the suggestion above.
If it's not broken, fix it until it is.
My Blog