Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Highlight bar... seek() question
Message
From
21/03/2000 08:01:05
Anthony Suarez
Black Marlin Data Corporation
Taguig, Philippines
 
 
To
21/03/2000 00:25:35
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00348206
Message ID:
00348257
Views:
28
>Hi all,
>
> 1ª Why this code didn't work, i have a textbox to do a search, but the highlight bar don't appear in grid.
>
> LOCATE FOR ALLT(this.value) $ &pcMyTable..c_descri
> IF FOUND()
> ThisForm.Grid1.REFRESH()
> ThisForm.Grid1.setall("DynamicBackColor",;
> "Iif(ALLTRIM(&pcMyTable..c_descri) = ALLTRIM(THISFORM.GRID1.COLUMN1.TEXT1.VALUE),RGB(0,255,255),
> RGB(255,255,255))")
> this.setfocus
> ELSE

> ENDIF
> ----------------
> 2ª i have my clients table index on name.client, why when a type "joao" i don't go to the first record begin with 'joao',
> but i go to the first like 'antonio joao'.
>
*****
1.You're almost there...
try this:
LOCATE FOR ALLT(this.value) $ &pcMyTable..c_descri
IF FOUND()
ThisForm.Grid1.setall("DynamicBackColor",;
"Iif(ALLTRIM(&pcMyTable..c_descri) = ALLTRIM(THISFORM.TEXT1.VALUE),RGB(0,255,255),
RGB(255,255,255))")
ThisForm.Grid1.REFRESH()
*this.setfocus
ELSE
ENDIF
****
2. Since you issued $ operator, it checks "target string" from the "source string". Unlike the "=", it checks only the first match character from the left side of the "source string". better try to use the "=" operator than "$".
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform