>When a control on a form receives focus, is there a way to determine which control lost focus just prior to that event?
>Thanks!
You may have some form custom property e.g. Form.lastactivecontrol and reset it in each Control.Gotfocus event, e.g.
***Control.Gotfocus
=messagebox(thisform.lastactivecontrol.name)
thisform.lastactivecontrol=this
If you use subclassed controls then it can be accomplished easy enough. Do not forget to set This.Lastactivecontrol=.NULL. in form.destroy event.
Edward Pikman
Independent Consultant