Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Not Found at End of Search 1

Status
Not open for further replies.

harryjr

Programmer
Jan 4, 2001
27
US
Is there anyway to evaluate "Not Found" returned at end
of a "Ctrl-F search" within a program?
 
I you use a locate() or seek() the function FOUND() returns .T. when your search has found something.

HTH, Weedz (The Grassman)
veld4663@exact.nl

They cling emotionally to code and fix development rather than choosing practices based on analytical assesments of what works best.

After the GoldRush - Steve McConnell
 
Weedz, I think he means the text search that is done when you press CTRL+F or choose Edit/Find.

HarryJr, I don't know of a built-in way to trap that. What you could do is replace the built-in text find with your own, but that's probably a lot more work than its worth.
Robert Bradley
 
This is for FOXDEV and WEEDZ,

Thanks for the reply. FOXDEV correctly identified which
SEARCH I am trying to evaluate.
Currently I am forced to search each line in MEMO field for the TEXT I want to find. On large MEMO FIELDS (some are 70K in length) it takes a long time. Note that all this is done within the program - the USER is not involved. I was/am hoping to find that I could evaluate (within the
program) any return of "Not Found".

HarryJr
 
HarryJr,

The CTRL+F Search is intended to be used in the UI, by the user. Although it is possible to use it programmatically using the KEYBOARD command, I would advise against it.

I would recommend you look into the AT(),ATC(), and OCCURS() functions in the VFP help. They work on memo fields, as well as, character expressions. Jon Hawkins
jonscott8@yahoo.com

The World Is Headed For Mutiny,
When All We Want Is Unity. - Creed
 
jonscott,

Thanks for the info. For now I've created a work around
using the AT() Function. I would still like to know if it
is possible to somehow EVALUATE (within a program) the
return "Not Found" for a Ctrl-F search.

Harryjr
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top