Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Synching child grid with parent record
Message
From
11/09/1997 14:49:02
Mandy Mccord
Public Interest Breakthroughs, Inc.
Albany, New York, United States
 
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00049461
Message ID:
00049603
Views:
57
>>I've got a form with a pageframe and several pages. In one of the pages I want the user to select a parent record with my nav. buttons and then refresh the grid of related child records which is displayed below with the corresponding records. I'm close but not quite there.
>>
>>In my form's Load Event I've included the creation and assignment of a public variable which is the relation between child and parent. I've also included several SQL statements to create the final cursor I need for grid display. I'm looking to use parameterized views for this.
>>
>>I'm now trying to get the right code for my page's Next button to move to the next parent record, capture the proper variable value and requery my final cursor to display the proper child records for the current parent record.
>>
>>I'm also getting "Function not supported in native tables" for my
>> =REQUERY('myfinalview')
>>line in my Next button's Click Event which I can't get a decent explanation of what this means.
>>
>>Any suggestions/samples?
>>
>>mtia!
>>Mandy
>
>Mandy,
>
>You might want to check out the .ChildOrder, .LinkMaster and .RelationalExpr properties of the child grid if this table in the grid's .RecordSource has a relation to the parent table which has the value of the textbox in it. This might also help to get rid of the PUBLIC var which is usually not done. Your public var can probably be made a property of the form.
>
>If the above does not work properly and you need views (queries) to populate the grid, that is easily done too. I've never come across the error message you are receiving, but I do have several views in some forms that need to run before the final cursor is ready for display. I've got code that does;
>
>REQUERY("View1")
>REQUERY("View2")
>REQUERY("View3")
>
>where View3 is the final result and becomes the record source for the grid. Each time a change is made, you've got to run all the queries, not just the last one.

That makes sense and I'm not sure I was doing that (yeah, I need views or cursors for the grids' record sources... still not sure which to use yet). Thanks for the advice, I'll give it a try.

Mandy
Previous
Reply
Map
View

Click here to load this message in the networking platform