>Thanks Borislav.
>I'll check it and if I have some questions I'll come back.
Note that at times nothing has focus, and your .activecontrol may be null, or cause an error if you try to use it. Also, .activecontrol may be a container, grid, pageframe, optiongroup, commandgroup (is there more?), which then has its own .activecontrol, .activepage, activecolumn and what have you, which then may be another containing object. Your actual active control may be a textbox in a container in a container in a cell of a column of a grid in a container on a page of a pageframe in a container on a page of a pageframe... which is altogether not too uncommon.
Not trying to scare you, just pointing out the nature of the issue.