>to check for a duplicate code, i tried using this.setfocus in a valid method, but it doesn't seem to work.
>
>if !tableupdate()
> =messgebox('Duplicate code. Please reenter')
> this.setfocus()
>endif
>
>is there a better solution?
Have you tried RETURN .F.?