>Dear All,
>
>In textbox valid event i put this code that check if the code already exist
>
>if seek(this.value, 'Customer1')
> return .f.
>endif
>
>I want that when user press cancel button this valid event shouldn't fire.
>
>TIA
>
>Nafees
In part to avoid this kind of problem, I find it much simpler to postpone all validation until the user presses "save".
Hilmar.
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)