Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
VFP6SP5: One-To-One relation auto sync the child pointer
Message
From
05/03/2003 16:50:22
 
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00759830
Message ID:
00761811
Views:
35
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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform