Re: Forms 5.0 - Auto query on new form

From: <scotten_at_my-dejanews.com>
Date: Tue, 15 Sep 1998 06:35:51 GMT
Message-ID: <6tl1s7$2hf$1_at_nnrp1.dejanews.com>


Russ,

In a form like that I set the DATABASE->WHERE Clause property of the master datablock. For instance: Where Clause = 'project_id = :parameter.project_id' For more info -> Online Help.

Then add a When-new-block trigger to that datablock containing 'execute_query;'

This way the form will auto query but... I think the form will go into some NEW state first (you won't notice unless u use a sequence for an initial value, you'll see it increased every time you run the form, it won't hurt though);

Good luck,

Sicco Otten

In article <35fdcba3.10079480_at_news.erols.com>,   See Signature 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
>

-----== Posted via Deja News, The Leader in Internet Discussion ==----- http://www.dejanews.com/rg_mkgrp.xp Create Your Own Free Member Forum Received on Tue Sep 15 1998 - 08:35:51 CEST

Original text of this message