Hi Mo ---
All variables are Local by default; once your program moves beyond Init, the filter can no longer be evaluated. I like Dan's idea of a parameterized view based on a Form property, but be careful to set NoDataOnLoad to .T. and REQUERY() the view in the Form Init.
>
>I am passing parameter to a form, in teh init I have the following code that give error VARIABLE NOT FOUND.
>*****************
>PARAMETER numID
>
>SELECT mains
>SET filter to mains.id = numid
>
>*****
>
>This one will work OK
>---------------------
>PARAMETER numID
>
>public x
>x=numID
>
>SELECT mains
>SET filter to mains.id = x
>************************
>
>If I change teh PUBLIC to PRIVATE I will receive the same error.
>Before set filter I can do WAIT WIND STR(numID) without a problem.
>
>what am I missing here???
>
>Thanks
>Mo
------------------------------------------------
John Koziol, ex-MVP, ex-MS, ex-FoxTeam. Just call me "X"
"When the going gets weird, the weird turn pro" - Hunter Thompson (Gonzo) RIP 2/19/05