>The most flexible way to create a dynamic VIEW thats based on user defined criteria is to build up the underlying SQL into a string and recreate the VIEW on the fly. Using parameterized VIEWS only applies to the WHERE clause and is really not that useful.
>
>Since the SQL property of a VIEW is read only during runtime you'll need code that allows you to pass the SQL string as a parm to a procedure that recreates the VIEW based on the new SQL. You can get the complete VIEW definitions directly from GENDBC, a utility that ships with VFP.
>
>In order make this work you first must close the tables in the data evironment, drop the VIEW from the DBC, recreate the VIEW with the new SQL, then add the VIEW back to the DBC and reopen the tables.
>
>Charlie
Make sure to PACK the database periodically if you do this a lot, because it will seriously bloat with deleted records.
Insanity: Doing the same thing over and over and expecting different results.