Diana,
Filters and grids basically do not get along with each other very well. Parameterized views on the other hand will give you back the speed you've come to expect from FoxPro. Others have used SET KEY but I just find views to be so much easier to use.
>I have a user entry form that uses the idea from Tastrade where you have a grid on the first page of the 1 table - in this case clients - and data entry on the other pages for the many tables - in this case, emergency room visits, appointments, legal activities and the like. A user selects a client on the first page then clicks on the appropriate page to see activities for that client. This works great. Now my users would also like to filter that first page grid so that they only see clients who have participated in particular activities. Let's take emergency room visits for example. I'm just not clear on what the filter statement would look like (I'm using tables, so I would change the filter for the cursor of the client table in the data environment, right? Perhaps I just need to use a view and have the select statement be: select * from clients where nclient_id in select nclient_id from er_visits? ) Any idea how to make the filter statement do what the sql select statement
>above does? I tried using a udf that does a seek on the er table, so the filter statement looks like: getid('er_visits'), and it worked but it took about 5 minutes - 4 minutes and 50 seconds too long for me. Am I barking up the wrong tree with a filter? Should I just use a parametized view and shut up? If so, how do I set the view so it shows everyone when I want that? Arghhh.
>
>TIA