Francisko,
When you press enter in an Edit Box VFP inserts a carriage return
and a line feed. A line feed is CHR(10) so if you change the CHR(13) in your if statement to CHR(10) your code should work.
>How can i do that if a user press twice the enter key in a edit box the cursor jumps to the next control.
>
>I try this in the keypress event but doesn't work:
>
>if nkeycode=13 and right(this.value,1)=chr(13)
> nodefault
> xxxx.setfocus
>endif
>
>thanks