Hi Yes,
>When the query runs, if vpState does not exist, a window will pop up asking for a value. If vpState exists, then it will be used.
That's the concept. Define the variables before issuing a REQUERY(). One of the trick for requerying parent-childs is to have WHERE Child.ParentId = ?Parent.Id
Here I did not use a variable in the parameter but instead specified the Alias.FieldName and it would work the same. Though the parent record has to exist before the child is requeried.