Hi Jill,
>I've thought about somehow having a view parameter that will collect the entries required, but don't quite know how to handle this. If the main table has a field, lCompleted, obviously, I can query for all completed applications or all uncompleted applications, w/something like:
>
>... WHERE lCompleted = ?Thisform.lShowCompleted
>
>But how to expand that to query for all applications? this might be totally obvious, but I can't see it.
It seems to me that what you're asking is how to build a logical expression that allows for completed apps, uncompleted apps and all apps. And you can't do that within the confines of the paramaterized query.
You'll have to build your where expression on the fly and use cursors. Something like:
cWhere = "WHERE "
DO CASE
CASE SomeRadioButton = "All Applications"
cWhere = []
CASE SomeRadioButton = "Complete Applications"
cWhere = cWhere + "lCompleted = .t."
CASE SomeRadioButton = "Incomplete Applications"
cWhere = cWhere + "lcompleted = .f."
ENDCASE
...
SELECT * ;
FROM MyTable ;
&cWhere ;
INTO CURSOR curGrid
For speed's sake you might want to build a view or a cursor to query against, depends upon how long it takes to build that view, but I've done that before - build a base table and select from it into a cursor for the grid. Keeps things snappy and fast. That might also eliminate your need for indexes which can be difficult to clean up.
-cjh