Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Child grid
Message
From
06/01/1998 11:01:35
 
 
To
06/01/1998 10:54:30
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Miscellaneous
Thread ID:
00069787
Message ID:
00069791
Views:
65
>Hello everyone,
>
>I've three tables, clients, groups, mbship. Every client cn be a member
>of one or more groups. So I decides to make the following:
>table client
> id_cl
> etc
>
>table groups
> id_gr
>
>table mbship
> id_mb
> id_cl
> id_gr
>
>I want to display the clients as a parent records and the groups as the child records. With an sql statement like
>select client.id_cl, groups.id_gr from ... ;
>where client.id_cl=mbship.id_cl ;
>and client.id_cl=select_id....
>it works, but not in a form.
>Any hints outside there?
>thanks Wolfgang

To collect all groups pertained to particulat client id you should collect records into cursor:
Select groups.* From groups,mbship Into Cursor tmpGrid;
Where groups.id_gr=mbship.id_gr ;
And mbship.id_cl=nSelectedClient ;

and now you use tmpGrid as Grid.Recordsource:
Thisform.grid1.recordsource=""
Thisform.grid1.recordsource="tmpGrid"
Thisform.grid1.refresh
Edward Pikman
Independent Consultant
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform