OK. In any case, if you do a SELECT - SQL command (select ... into cursor ... nofilter), you can use reccount(). Even without the NOFILTER, the variable _tally will tell you how many records were selected. (Copy it to a variable immediately, because many commands will affect the variable _tally.)
By the way, it is recommended to use the HTML code PRE for program code - that way, spaces will be maintained, and automatic word wrap is turned off. I am formatting your code as an example; click on "REPLY" to see how the codes look:
>Hello Hilmar
>
>Thanks for your reply because that help me to understand better how work the RECCOUNT(), also i solve my problem writing my code and declare a variable "lncontador" to keep the value of the numbers of rows in my grid (Cursor) , like this:
>
Select ox
if ox.olorigem = 'CX90'
select oy
lncontador = 0
scan
lncontador = lncontador + 1
endscan
if lncontador > 1
msg("Não pode ter mais que uma linha," + CHR(13) + ;
"pois trata-se de uma Letra")
return .F.
endif
endif
select ox
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)