Use reccount(), NOT eof(), etc. You can not use _tally because VFP does not update this variable in this circumstance. There are too many IFs on when VFP _tally is or is not updated to go into. Generally, _Tally gets updated only when you do something
locally.
>Hi all, I have several lookup textboxes that query a remote view for a valid code as in:
>
>
>tcCode = this.value
>requery("MYVIEW")
>if _TALLY > 0
>
>endif
>
>
>The views are parametri.., parametris..., use parameters :) as a filter condition as in:
>
>select ..
>.. ;
>where cCode = ?tcCode
>
>The problem is that I am having a strange problem with one of them, _tally is 0 even though the select retrieves a record (It's supposed to retrieve only one or none), so the program assumes an invalid code.
>
>I found a safe workaround, but I'm confused, isn't _Tally supposed to contain the number of retrieved records by the select? , or am I missing something?, the other textboxes doing this are working properly relying on the value contained in _TALLY.
>
>TIA
Mark McCasland
Midlothian, TX USA