>>Thank you but it doesn't work for me.
>>I don't want to create view each time, I would like to requery it, so I need
>>parameters.
>
>You need to use both the macro and the ? :
&?rExpr = ?rString
>
>You won't have to recreate your view each time.
>
>or even
>
CREATE SQL VIEW lvMyView AS SELECT * FROM mytable WHERE &?lcWhere
>Then the WHERE can be whatever you want it to be....
>
>Just make sure the
&
is in front of the
?
Have you tried this - I get a syntax error if I don't pre-populate lcWhere, regardless of the value for lcWhere, even ".T." - I can't even modify the view definition, getting a Syntax error. It will fire if I pre-populate lcWhere with a string that macro-expands to a simple logical; I can' modify the view properties, or requery it if the pre-populated value goes out-of-scope. It also gets upset if I add clauses after the logical. I can however:
CREATE SQL VIEW lvMyView AS SELECT * FROM mytable WHERE EVAL(?lcWhere)