Hi Remou,
Thanks A lot. thiis made me more clear.
But I still have a problem...
My MainForm has a Calender 'ActiveX control', from where I want to set focus to the SubForm.
I have put the code in the calender's 'AfterUpdate' event.
When I click down on the Calender, I see for a second that the desired control in the SubForm has got Focus, but then it disapears...
I think that the cause might be, because the 'AfterUpdate' event fires while the mouse is still down on the calender, and therefor the focus must return to the calender.
I would try to put the code in a 'MouseUp' event, but I don't see any 'MouseUp' event for the calender control...
(by the way, in the 'AfterUpdate' event, I also assign a value to the control in the SubForm.)
Thanks in advanced,
Ja