Hi Larry,
You can create a parameterized view such as
SELECT * FROM YourTable WHERE YourTable.cParentId = ?vp_cParentId
This way, you can define the value of variable vp_cParentId and issue a REQUERY().
>I am displaying/editing parent and child records from within a formset. I am using a parent view and a child view. I can create the views thru the view designer for testing, but I need to be able to programmatically create and save the views in a database, that allows me to display the child records when navigating thru my parent records, without using the view designer.
>
>No problem creating the parent view.
>
>How do I add the parent view to the child view without setting up a relationship, so I can run the query...
>
>SELE * FROM childtable WHERE childtable.parentkey=parenttable.keyfield
>
>I have tried using DBSETPROP with the TABLES property, and although the changes are save, I have to open the parent table before I can open the child view.
>
>In the view designer I would simply add the parent view to the data environment, then create the view.
>
>PHIS!
>(Please Help...I'm Stumpped!)