>Hi all
>
>I have a modal form class which get the From-To dates from the user. I have put logic in the VALID() (also tried LOSTFOCUS()) that checks of the To date is not more than 50 days from the From date. In such a case I raise a MESSAGEBOX() stating the To date has been reset to max +50 days to please recheck the dates, then I do a THIS.SETFOCUS()
>
>Now when the MSGBOX is activated and if I press Enter to okay the MSGBOX, then Enter is passed onto my modal form and the default button Ok is also pressed. I have tried to use CLEAR TYPEAHEAD after the MSGBOX but no luck.
>
>Please advise on what is happening.
Hi Bhavuti
You've got me confused here:
1) I thought the modal form did the date-getting and validation, and MSGBX warning, so what do you mean: "...then Enter is passed onto my modal form and the default button Ok is also pressed"
2) You've oulined the scenario now can you explain more clearly what happens.
3) a sample of code would help illustrate the problem, which I can't determine from your post.
- Whoever said that women are the weaker sex never tried to wrest the bedclothes off one in the middle of the night
- Worry is the interest you pay, in advance, for a loan that you may never need to take out.