>>>
>>>With VFP you can nest programs 128 deep. Unless you have some recursion going on here, you should be okay. If you are using recursion, take a look at your design to make sure you haven't created a situation that could exceed this limitation.
>>>
>>>The simple answer to your questin is yes you can.
>>
>>Thanks - I guess it's back to the drawing board to see what's causing the nesting error.
>
>Is it possible to post the code? Maybe someone here can spot a problem. Sometimes it's better to have mulitple sets of eyes looking at something. You may be too close to the situation.
I found the error - here's the code anyway. I forgot an 'endif' in the procedure. The line I added to make it work is preceeded with &&&&****
************************************
*
* 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