>I am using the VFP6 application generator and wizards to make screens. I have a screen ("child"), but now client wants to display a field from the child's parent file. Can someone point me to an example or suggest the best approach?
>
>I tried:
>Add parent table to DE, but parent field value doesn't change when I Next, Prev, through the Child records etc.
>
>How do I tell it to refresh the parent field value?
>
>TIA,
>Sylvia
Hi Sylvia,
Have you thought about using a parameterized local view?
Create a local view with a WHERE clause that looks like this:
SELECT <parent fields you want> ;
FROM <parent table> ;
WHERE <parent primary key field> = ?lcChildKey
Add that view to the DE of the child form. Then, whenever you need parent information, call a method that populates lcChildKey and issues the REQUERY() statement to the view. That view would then contain the parent row that corresponds to the child, and you could use the values accordingly.
HTH.
Evan Pauley, MCP
Positronic Technology Systems LLC
Knoxville, TN
If a vegetarian eats vegetables, what does a humanitarian eat?