Page 1 of 1

Locate a subsequent record

Posted: Thu 28 Mar 2013 12:15
by sandy771
I have a grid that is connected to a UniTable that is sorted on column a. I am using Locate to find the first record in column b that starts with a given letter and move the cursor to it. This works fine

However, I want to implement a "find next" function that moves the cursor onto the next matching record. Any ideas how to go about this?

Thx

Re: Locate a subsequent record

Posted: Thu 28 Mar 2013 15:17
by AlexP
Hello,

To locate the next/previous record, you can use the LocateEx method, where you need to specify the lxNext/lxUp search direction as the last parameter:

Code: Select all

UniQuery1.LocateEx('ID',10,[lxNext]);