>I want to set the focus back to the previous active control
>when a button is pushed.
>
>How can I know which is the previous active control?
In your base textbox, editbox, etc. classes, add the following code to their
LostFocus events.
ThisForm.oLastCtl = This
In your button's Click event:
ThisForm.oLastCtl.SetFocus()
In your base form class, add oLastCtl as a custom property and add the
following to the Unload event:
ThisForm.oLastCtl = .NULL.
This was done on the fly, without testing, but it should get you pointed
in the right direction...