What's illegal about it is that the filter is going out of scope the minute you leave that textbox. "This.Value" is being reinterpreted as something other than expected.
If you really must use a filter (yuck), consider setting an application object or form property in the Valid and basing the filter on that.
>I have a textbox and in the valid event I am trying to set a filter on the current table.
>Code in Valid:
>
>select mytable
>set filter to mytable.field1=this.value
>
>Field1 is c10. Every time I try to exit the field I get an error stating operator/operand mismatch.
>BTW - I've tried LostFocus with the same results. Is this not a legal operation?
------------------------------------------------
John Koziol, ex-MVP, ex-MS, ex-FoxTeam. Just call me "X"
"When the going gets weird, the weird turn pro" - Hunter Thompson (Gonzo) RIP 2/19/05