Re: Insert record before First in Forms 4.5?

From: herbert.fukerider <herbert.fukerider_at_rfn.de>
Date: Mon, 12 Jul 1999 20:27:36 +0200
Message-ID: <378A3398.310FC02E_at_rfn.de>


Fraser Boswell wrote:

> We have a table of including from_date sorted descending, so the most
> recent from_date is at the top, and we want to insert a new record above
> the first_record, which will carry the current date (sysdate). That way
> all records will still be in proper from_date order. We then have to
> cycle through the records so it is important that the records are Date
> ordered.
> So how do you sort it so that if you are on the first_record of the
> block, an insert will appear above it?

Hi,
you could check if you are in the first record of the block. If true, then duplicate record instead of insert a new one, navigate to te first rec and clear all items (except those with default values).
It will look like you inserted above the first record. But you will not be able
to duplicate items from the previous rec without further coding.

An other solution might be to prevent users from leaving the block or record without sorting it through a new DO_KEY('EXECUTE_QUERY') using a POST... or WHEN... trigger. This way users are able to insert anywhere
and duplicate items from the record above.

Hope this will help you a little bit.
H. Fukerider

--
"If Bill Gates had a dime for every time a Windows PC crashed--
 Oh, wait a minute... he does."
Received on Mon Jul 12 1999 - 20:27:36 CEST

Original text of this message