Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
VFP6SP5: One-To-One relation auto sync the child pointer
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00759830
Message ID:
00761811
Vues:
34
This message has been marked as a message which has helped to the initial question of the thread.
Hiya Bhavbhuti,

If your child grid is based on a RELATED child table, you should not have to use set filter.... in the refresh of the form,
you should have a command "SELECT myParentTable"... somwhere... after that, you should:

SELECT myChildTable
LOCATE

That should move the pointer to the top of the table, in this case to the first (and only) related record....


If that doesn't work (but it should), simple redefine the grid in the same refresh method...
WITH THISFORM.childpage.grd_on_childpage
	.RecordSource = .RecordSource
	.column1.ControlSource = "childtable.fld_child01"
	.column2.ControlSource = "childtable.fld_child02"
	.column3.ControlSource = "childtable.fld_child03"
	.SetFocus()
ENDWITH
Lookup Vlad articles on Grids. They will help heaps!!!


R



>Hi all
>
>I have a Master table which has a child table (user defined fields) in a 1-to-1 relation ship. On my form there is a page for this child table where the child is shown in a grid (change view). Currently I have to "set filter to" before the grid gets focus or else all records are shown.
>
>Is there a better way to do the same. I can use views but the fields are dynamic and will change on users requirement thus the Grid (Change view). I also do not have any save / revert option (the guy types in and it is saved) for this child as I am straight using the table, any future concurrency issue unforseen by me.
>
>Please advise
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform