Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Views
Message
From
04/11/1998 23:42:07
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Views
Miscellaneous
Thread ID:
00154664
Message ID:
00154664
Views:
61
I need help setting "views" in a form.
I have a form with a page frame and two pages. One with detail records and another containing a grid.
I need to be able to view the data, say Names.dbf, either completely or "filtered" to only those key values contained in a selected table whose name will vary, but call it the "Query" table. There is a whole set of "query" tables predefined that the use can choose from a popup. The popup is outside the pageframe, so can be changed either while details or the grid is displayed.

So Names.dbf might contain fields pkey i, name c(40), town c(30)... etc, but all the query tables only contain a single field pkey i. Get the idea?

So how do efficiently set up an editable view which is essentially either..

SELECT * from Names where pkey in (select pkey from "query") && where "query" can change
or
all records in Names if user chooses no filter.

I can handle the SQL but how do I parameterise the view expression?
How do I change the source of the grid to match?

You see if I did this in FPW 2.6 it's simple, it's fast, I wouldn't even need to run a query, just set a relationship from Query into Names, and that would work in the browse as well. But I'm not sure on the best approach in VFP.

I'm sorry this is a complicated question, but it's a sort of design structure that comes up often in my sort of apps. So would really appreciate a jump start.
Next
Reply
Map
View

Click here to load this message in the networking platform