>I´ve a form with one texfield control
>i create a property form called exit_form = .f.
>
>in the thisform.txfield.valid
>if thisform.exit_form
> thisform.release
>endif
>
>if this.value >= date() or empty(this.value)
> return .f.
>endif
>
>What i want to do is if i click on the form close button i want to exit the form, but the valid event don´t let me
>
>where do i have to put thisform.exit_form = .t.
> thisform.queryunload ...???
Yes, you can do something like, in Queryunload:
if !thisform.exit_form
nodefault
endif
Also you can put the thisform.exit_form = .T. in the Lostfocus of the tbox, that way it runs after the Valid is checked. Probably a better solution.
The Anonymous Bureaucrat,
and frankly, quite content not to be
a member of either major US political party.