keepingbusy
Programmer
Hi all
How do I find the next match using SEEK? For example, if I enter the name DAVIES and the first record found is NOT the correct one, I need to continue searching. I've tried CONTINUE etc but that doesn't work.
Sometime back (thread184-843495) it was suggested that SEEK is the quickest way to search. I did try LOCATE but this is very slow when you have 5000+ records. The problem here is that the table contains both forename and surname in the same field (Dont shoot the messenger, it was nothing to do with me!)
This is what I have so far:
* mline01 is the variable for the NAME
Look forward to any replies
Lee
VisFox Version 6 User / Windows ME
How do I find the next match using SEEK? For example, if I enter the name DAVIES and the first record found is NOT the correct one, I need to continue searching. I've tried CONTINUE etc but that doesn't work.
Sometime back (thread184-843495) it was suggested that SEEK is the quickest way to search. I did try LOCATE but this is very slow when you have 5000+ records. The problem here is that the table contains both forename and surname in the same field (Dont shoot the messenger, it was nothing to do with me!)
This is what I have so far:
* mline01 is the variable for the NAME
Code:
SET ORDER TO LINE01
GO TOP
SET NEAR ON
SEEK TRIM(mline01)
IF FOUND()
THISFORM.GRID1.SETFOCUS()
nmessage=MESSAGEBOX("Found: "+ ;
TRIM(LINE01)+" - "+TRIM(TRANSACT)+ ;
", Continue Search?"+SPACE(5), ;
4+32+256,"System Message")
IF nmessage=7
* What goes here to continue search?
* Or any alternative method
ENDI
Look forward to any replies
Lee
VisFox Version 6 User / Windows ME