Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Display all child records in a grid
Message
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00430854
Message ID:
00430867
Views:
11
>Hi all
>
>I am working on a form which is parent-child form. This form is based on 2 remote-views(purchase order is for parent part, purchase item is for child part). And the connect key between them is po_no(purchase order number).
>
>On that form (1st form of formset), I have a search button(I made it, not from buttonset). Click on that search button, it goes to a second form( of formset) which is used to search for po_no. On the 2nd form, I have a combo that stores all outstanding p.o. Choose the p.o from the combo, then click the submit button. It will lookup that p.o and records from the view. If match, then display the records on the first form. I can use Find button from buttonset (comes with vfp) to search but because there are too many purchase orders that the users don't know which are still oustanding to type into the box.
>
>My problem is it displays the parent-part and only the first record in the grid. How to display all records in the grid that match the po_no?
>Any suggestions would be great help. Thanks in advance.

Is the RowSource for the grid the Parent table? If so, then the parent occurs once, and points to the first matching child record. Navigating to the next row, if the RowSource is the Parent table, then the next Parent record appears, linked to its first child.

Rather than displaying both the parent and it's related children in a single Grid, it would make more sense either to have two Grids, one a set of Parent records, and the second the set of children matching the Parent record, or to simply display the sole Parent detail outside the Grid, and then use a Grid to display it's children.
EMail: EdR@edrauh.com
"See, the sun is going down..."
"No, the horizon is moving up!"
- Firesign Theater


NT and Win2K FAQ .. cWashington WSH/ADSI/WMI site
MS WSH site ........... WSH FAQ Site
Wrox Press .............. Win32 Scripting Journal
eSolutions Services, LLC

The Surgeon General has determined that prolonged exposure to the Windows Script Host may be addictive to laboratory mice and codemonkeys
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform