>Hi,
> I place the following code in textbox.interactivechange event. It cause ERROR "Function arguement value, type or count is invalid" if i issue mygrid.SETFOCUS or .REFRESH
>
>
>
>SELECT myMember
>
>WITH THISFORM
> IF .cboSOption.VALUE = "Partial Name"
> SET FILTER TO LIKE("*" + ALLTRIM(THIS.VALUE) + "*", MyMember.E_Name)
>* .LOCKSCREEN = .T.
>* .GRIDHIGHLIGHTER1.INIT()
>* .LOCKSCREEN = .F.
> ELSE
> SEEK(ALLTRIM(THIS.VALUE))
> ENDIF
>
> .grdMembers.SETFOCUS
>
> THIS.SETFOCUS
>ENDWITH
>
>
>Any ideas?
A filter expression gets evaluated not at time when you issue
SET FILTER but when attempt is made to move record pointer in a table. At this time
THIS.Value cannot be resolved anymore.
The code below should fix the problem:
lcLikeExpr = ["*] + ALLTRIM(THIS.VALUE) + [*"]
SET FILTER TO LIKE(&lcLikeExpr, MyMember.E_Name)
--sb--