Re: Forms problem

From: Matt B. <mcb_at_fightspam.sd.znet.com>
Date: 2000/06/28
Message-ID: <sll85in5jev18_at_corp.supernews.com>#1/1


"Mike Dwyer" <dwyermj_at_co,larimer.co.us> wrote in message news:Lkp65.106$Pl2.47213_at_wdc-read-01.qwest.net...
> Nice solution, Matt. May I suggest another but similar one for deval?
>
> Create a text item in the control_block, name it 'something_ROWID'.
> (Reference the query datablock.)
>
> In the query block, create this KEY-ENTQRY trigger:
> :control_block.something_rowid := :something.rowid;
> enter_query;
>
> In the query block, create this KEY-EXEQRY trigger:
> if :control_block.something_rowid is null then
> :control_block.something_rowid := :something.rowid;
> end if;
> execute_query;
> while :something.rowid <> :control_block.something_rowid
> and :system.last_record = 'FALSE' loop
> next_record;
> end loop;
> if :something.rowid <> :control_block.something_rowid then
> first_record;
> end if;
> :control_block.something_rowid := null;
>
> By saving the rowid instead of the block position, you will always return to
> the same database row, even if the re-query returns a different result. If
> the original row is not in the new result set, you will remain on record #1.
>
> - Mike

Good idea - I like your idea better. That way the user goes to the row they were on based on the ROWID regardless of the row's position in the block (where I was suggesting using a GO_RECORD). That way if the user requeries the block with different query criteria and the same data row reappears after execute_query but in a different position in the block (because of different query criteria), they still get sent to it.

Cheers,

-Matt Received on Wed Jun 28 2000 - 00:00:00 CEST

Original text of this message