Re: Forms 5.0 - Auto query on new form

From: Joe Brown <NoSpamMeVeryMuch_at_leading.net>
Date: Tue, 15 Sep 1998 13:49:42 GMT
Message-ID: <35fde1e9.22899487_at_news.leading.net>


On the block level of your second form add a Pre-Query trigger with code:

:Block.pk_Item := :Parameter.pk_Item;

When-Form-New-Instance need only to
Execute_Query;

Done deal...
jb

nospam_at_erols.com (Russ Lister) wrote:

> I have a form that passes a primary key to a second form via a
> default parameter list. The second form is called with a NEW_FORM and
> tracing shows that the parameter is passing.
>
> In a WHEN_NEW_FORM_INSTANCE trigger, I set the primary key value
> from the parameter list into the parent block item for the key and
> then execute the EXECUTE_QUERY command to get the parent record and
> have the child blocks auto-fill with the correct details.
>
> Problem: The form is set to NEW status when I set the primary key
> value in the form (it asks if I want to save changes), then it clears
> the block (or whole form) and executes a full (null criteria) query.
>
> What is the trigger I should use to set block items so as not to
> have the form think I'm creating a new record? Or, how can I get the
> form to auto-query with criteria I pass to it?
>
> Russ
>
> --
> email to rlister{at}erols{dot}com

--
joebrown
_at_leading.net
Received on Tue Sep 15 1998 - 15:49:42 CEST

Original text of this message