Re: Dev 2000 forms - Record navigation Q

From: Steve Cosner <stevec_at_zimmer.csufresno.edu>
Date: 13 Jun 1999 05:25:41 GMT
Message-ID: <7jvfcl$hah$1_at_nntp.csufresno.edu>


In article <7jpbk2$2pf$1_at_news1.skynet.be>, Bert Vanderstraeten <bvds_at_hotpop.com> wrote:
>
>I've got a table filled with over 10.000 records which I'm navigating
>through in a form. If I want to look up a certain record f.e. ID 2000, the
>form executes a next_record() function 2000 times.
>
>Ofcourse this results in low performance but I did not use the execute-query
>with the ID value because it would only return one record and thus
>navigation would be no longer possible from this record to the next/previous
>one..
>
>Or is there a way?

It takes a little behind-the-scenes work, but you can do this:

Get the ID from the user.

Open a cursor:
  Select ID from The_Table where ID < User_entered_Value

     Order by ID desc;

Fetch the number of records you want to allow your user to scroll up from the requested one, and use the id from this record to set the block's where clause.

Set block's where clause: ID >= New_Selected_Id

Execute_Query;

Scroll down using Next_Record until the user's requested ID number is in the top record in the block's display.

HTH
Steve Cosner



http://members.aol.com/stevec5088
Downloadable Quick Access utility form: Display and update any table. Received on Sun Jun 13 1999 - 07:25:41 CEST

Original text of this message