>Hi Nadya,
>
>You are absolutely right. I didn't check properly before butting in, sorry.
>
>I know you have solved your problem now, but I still wanted to emulate your problem, so I created a container class, added the standard MS _olecalendar control plus a text box and place the following in the LostFocus method of the _olecalendar control
>
>IF This.Object.DayOfWeek = 1
> WAIT WINDOW 'Sundays not allowed' TIMEOUT 3
> NODEFAULT
>ENDIF
>
>When I added the class to a form and ran it, it worked as expected, preventing me from moving the cursor to the text box.
>
>Have I misunderstood or is there something different about the Active X controls we are using?
>
>Alan
The difference is I put nodefault in the Container LostFocus event, not the ActiveX control LostFocus, because I delegated the validation logic to container object.
If it's not broken, fix it until it is.
My Blog