Re: focus question

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



All you can really do is have each control on the form "announce itself" in
GotFocus(). Store the name of the control into a form property. Then you can
reference that in your button's When().

Dan

marek wrote:
> Hi All,
>
> I have commandbutton. I need to know which form object had focus just
> before commandbutton gets focus. Commandbutton gets focus by Click
> Event.
> I tried to use thisform.activecontrol but in some sitiuations this
> property is empty and command vartype(thisform.activecontrol) = 'O'
> causes an error. I validate "thisform.activecontrol" on
> commandbutton.when event
>
> Any hints?
>
> Greetings in advance
> Marek


.


Quantcast