Hi J.M.,

After user exits form, can you just check the last row of primary table and 
get linking ID? Then test for secondary table existence with ID. If none then 
delete primary row. 

This might be able to be done with a trigger but is easy to do with code. I am 
not sure which table you would put the trigger on. If you put it on the 
secondary table it would not get fired if no row was added. If you put it on 
the primary table on insert there would never be a secondary row yet so it 
would always delete the primary row before you got the chance to add a 
secondary row. Perhaps in a 2 table form, both tables are added at the same 
time. I have never tested this but I doubt it is built to act like that. It would be 
very difficult to check rules and keys unless the primary row was added 
before adding the first secondary row.

Best regards,
Mike Young

On Tue, 15 May 2001 09:26:28 -0400, J.M. GRATIAS wrote:

>
>Hi all,
>
>I have a 2 tables form used in both ENTER and EDIT USING mode.
>
>Primary table use no tiers and columns are spreaded on 2 pages.
>
>Secondary table can have severals rows linked to the same primary row, 
and
>at least one.
>A tiers is set to display severals rows on the same screen.
>
>I need to insure that, after adding a primary row,  user can't exit the
>form without adding at least one secondary row.
>
>I other way, I don't want to have orphan primary row ...
>
>As I am not familiar with triggers, I try to do that trhu EEP, without any
>success.
>
>Any idea to help putting me in the rigth direction ?
>
>TIA,



Reply via email to