>I have five tables open in a DATA ENVIRONMENT for a form, 3 that are linked to each other and 2 FREE TABLES. The two FREE TABLES should be irrelavent here. I want one of the 3 linked tables (
SALES) to control two other linked tables (
SALE_LINES and
PURCHASE_PARTNERS) in that environment.
>
>
sales.sale_id is a Primary index
>
purchase_partners.sale_id is a Regular index.
>
sale_lines.sale_id is a Regular index
>
>In the data environment I have set the FILTER for
PURCHASE_PARTNERS to
purchase_partners.sale_id=sales.sale_id purchase_partners information is displayed on the form using typical controls; nothing unusual. This information is filtered properly and appears as expected in the form.
>
>In the data environment I have set the FILTER for
SALE_LINES to
sale_lines.sale_id=sales.sale_id. sale_lines information is displayed in a grid. The expected entries in my
sale_lines grid appear correctly only when the form is first loaded. When I SKIP+1 in the
sales table then grid simply shows no entries. If I SKIP-1 in the
sales back to the original sale then the correct
sale_line information for that sale is displayed in my grid.
>
>The
sale_lines table filter does not seem to be changing as the
sales change.
>
>I have spent 3 hours trying all the usual stuff, including:
>- removing the tables from the data environment and readding them
>- forcing the filter to update after my: SELECT SALES, SKIP+1, by doing a SELECT SALE_LINES, SET FILTER TO SALES_LINES.SALE_ID = SALES.SALE_ID
>- checking the Help files
>- swearing
>Nothing has helped. I am now baffled. This can't be a limitation of VFP. A VFP table must be able to control two other tables in the same database using the filter command.
>
>Idea's???
The most reliable way is to use parameterized view/cursor instead. Grids don't like filters (you can find some workaround to apply filter to grid, but it's really unstable).
Edward Pikman
Independent Consultant