>Hi Gang!
>
>I am having a brain poopoo at the moment.
>
>I want to save my work area before going into some code that may or may not run.
>
>After the code is finished, I want to go back to my saved work area
>
>
>I started like this..
>
>
>lcRx_No = ''
>lnSelectedWorkArea = SELECT()
>IF NOT USED('rx_107')
> USE IN 0 rx ALIAS rx_107 AGAIN
>ENDIF
>SELECT rx_107
>IF This.m_seek(rx.rx_no,'rx_107','UPDATEDRX')
> lcRx_No = ALLTRIM(STR(rx_107.rx_no))
>ENDIF
>USE IN SELECT('rx_107')
>IF lnSelectedWorkArea > 0
> SELECT &lnSelectedWorkArea
>ENDIF
>
>
>It saves the work area ok in lnSelectedWorkArea
>
>but the SELECT &lnSelectedWorkArea gives an error "Command contains unrecognized phrase/keyword"
>
>
>So, what did I do wrong here? Thanks!!!
Use instead
select (m.lnSelectedWorkArea)
And you don't have to test if it's >0 or not.
If it's not broken, fix it until it is.
My Blog