Please ignore the stuff below, I made a mistake with the old cut and paste.
>************************************
>*
>* skip through the records created in cursor gltemp1
>* to see if they are subject to any of the 'mathcing rules'
>* IF so, then loop through the chk_rules cursor to see
>* if the rules are satisfied
>*
>***************************************
>
>
> do while .T.
>
> if eof()
> exit
> endif
>
> lcgltemptext = alltrim(gltemp1.desctext)
>
> select chk_rules
>
> DO while .T.
>
> if eof()
> exit
> endif
>
> lcval_gl_text = alltrim(chk_rules.gl_rule)
> lcval_st_text = alltrim(chk_rules.st_rule)
>
> if occurs(lnstdesc,lcval_st_text)>0
> if occurs(lcgltemptext, lcval_gl_text)>0
> select gl
> locate for gl.unique_id = gltemp.unique_id
> if ! found()
> =messagebox("error",0,"test")
> else
> lcmatch_continue = .t.
> endif
> else
> lcmatch_continue = .f.
> endif
> endif
>
> skip
>
> loop
> ENDDO
>
> if lcmatch_continue = .t.
> exit
> ************************************
>*
>* skip through the records created in cursor gltemp1
>* to see if they are subject to any of the 'mathcing rules'
>* IF so, then loop through the chk_rules cursor to see
>* if the rules are satisfied
>*
>***************************************
>
>
> do while .T.
>
> if eof()
> exit
> endif
>
> lcgltemptext = alltrim(gltemp1.desctext)
>
> select chk_rules
>
> DO while .T.
>
> if eof()
> exit
> endif
>
> lcval_gl_text = alltrim(chk_rules.gl_rule)
> lcval_st_text = alltrim(chk_rules.st_rule)
>
> if occurs(lnstdesc,lcval_st_text)>0
> if occurs(lcgltemptext, lcval_gl_text)>0
> select gl
> locate for gl.unique_id = gltemp.unique_id
> if ! found()
> =messagebox("error",0,"test")
> else
> lcmatch_continue = .t.
> endif
> else
> lcmatch_continue = .f.
> endif
> endif
>
> skip
>
> loop
> ENDDO
>
> if lcmatch_continue = .t.
> exit
> endif &&&&****this is what I was missing and therefore the nesting err
>
> select gltemp1
> skip
> loop
>
>
>enddo
Al Williams
Anola MB, CANADA