>Tried it, that didnt help, thanks for the go top tip though.
>Here is an explination of why the select 'diecmm' wouldnt help:
>
>SCAN always reselects the right work area (the one the loop started in) when it reaches ENDSCAN, so you don't need to reselect even if you've changed work areas inside the loop. We know a lot of people who do so anyway. There doesn't appear to be a performance penalty for this, so if you're the belt-and-suspenders type, go right ahead.
well i dindn't know that. normaly i am not a belt-and-suspenders type but if there is no perfomance loss, hey why not, just to be safe.
hmm, then i don't know. i would try (just for the heck of it) to take the for clause out of the scan command and see what happens, to try to 'fence in' the problem.
>
SELECT 'diecmm'
>SCAN FOR !(diecmm.imported)
> *replace diecmm.imported WITH .t.
> SCATTER memvar
> SELECT 'dieactualdata'
> LOCATE FOR dieactualdata.jobnum=m.jobnum AND dieactualdata.itemnum=m.itemnum
> IF FOUND()
> IF m.atd1>0
> SELECT 'dieparams'
> LOCATE FOR dieparams.jobnum=m.jobnum
> IF FOUND()
> m.atl1=dieparams.tl1/2
> IF m.atd2>0
> m.atl2=dieparams.tl2/2
> endif
> ELSE
> thisform.omessage.warning('Parameters are missing for: '+ALLTRIM(m.jobnum))
> endif
> ENDIF
> SELECT 'dieactualdata'
> WAIT STR(m.itemnum)+' '+STR(m.aol,8,5) window
> GATHER memvar
> ELSE
> lcError=lcError+CHR(040)+ALLTRIM(diecmm.jobnum)+CHR(032)+ALLTRIM(STR(diecmm.itemnum))+CHR(041)+ CHR(032)
> ENDIF
> SELECT 'diecmm'
>ENDSCAN