Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Synching child grid with parent record
Message
 
À
10/09/1997 22:22:53
Mandy Mccord
Public Interest Breakthroughs, Inc.
Albany, New York, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00049461
Message ID:
00049482
Vues:
54
>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.

Let me know if you need more.

Steve Despres
sdespres@crosslink.net
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform