Re: simple (?) problem with forms45

From: Fabrice Burghgraeve <Fabrice.Burghgraeve_at_wanadoo.fr>
Date: Thu, 27 Aug 1998 00:36:40 +0200
Message-ID: <6s22ql$99r$1_at_platane.wanadoo.fr>


igal_at_healthstreet.com a écrit dans le message <6s18n0$bvn$1_at_nnrp1.dejanews.com>...
>In article <6rv1ph$r5f$1_at_platane.wanadoo.fr>,
> "Fabrice Burghgraeve" <Fabrice.Burghgraeve_at_wanadoo.fr> wrote:
>> Hello.
>> I have a simple problem that i can solve with forms.
>> for example, suppose the table is :
>> table names
>> code varchar2(3) primary key
>> first_name varchar2(30)
>> last_name varchar2(30)
>>
>> I want to create a form, that displays the 3 fields, and
>> that does the following :
>>
>> The user enters the code and press enter (or tab...)
>> If the codes exists, forms shows the actual data, goes to first name. The
>> data will
>> then be modified
>> if it does not exists, forms goes to the first name, and can create the
new
>> entry
>> in the database.
>>

(...)
>Hello Fabrice, you could do what you described, but you'll have to write
all
>the functionality yourself. Create your block manually - not based on the
db
>table. Place your code in the ON-CHANGE trigger for CODE item to determine
if
>this is new or existing data. If new - populate two other items ..... and
so
>on. You have a good start here. If you need further help - don't hesitate
to
>post questions. Good luck, Igal
>
>-----== Posted via Deja News, The Leader in Internet Discussion ==-----
>http://www.dejanews.com/rg_mkgrp.xp Create Your Own Free Member Forum

Thanks for your response... I will try that way. Here is a way we just found today...
create two blocks. In the fisrt, only a code, that does not references to a base table
item. The next navigation block contains the code too, and the other fields,  but the code is not displayed
In the when-new-block-instance trigger of the second block, copy the code from the first block,
execute_query, then copy the code again (in case of no record retrieved) a post-item trigger on the code in the first block that raise form_trigger_failure if
NULL (avoid navigate without entering the code) That seems OK... Received on Thu Aug 27 1998 - 00:36:40 CEST

Original text of this message