Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Grids and SET RELATION problem
Message
From
26/04/2001 12:26:35
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00500174
Message ID:
00500199
Views:
39
>I have four grids on a form that associate with four tables--one parent and three child tables. The relations are set as follows:
>
>
>SELECT t_pi01
>SET RELATION TO T_PI01.prot_no+STR(T_PI01.prot_yr,2) INTO T_PI02 ADDITIVE
>SET RELATION TO T_PI01.prot_no+STR(T_PI01.prot_yr,2) INTO T_PI03 ADDITIVE
>SET RELATION TO T_PI01.prot_no+STR(T_PI01.prot_yr,2) INTO T_PI04 ADDITIVE
>
>
>Later in my program I want to turn off the relations and view all the records. So I do the following:
>
>
>SELECT t_pi01
>SET RELATION TO
>Thisform.Refresh()
>
>
>All the grids have a RecordSourceType set to "Alias"
>
>
>PROBLEM: All the child grids still show only the related records from the last relation. I cannot get the child grids to show all the records.
>
>What am I doing wrong?
>



Try doing a LOCATE in the .Refresh() after severing the relation. Another approach would be to use a parameterized view for each of the child grids, queried on the appropriate value from the parent table. To show all records you requery on parameter = .NULL.
-Henry-
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform