>I am trying to gain flow control and perform certain actions based on where the user came from (what was the last object they were on) compared to what they went to (object they are on now), since the user can use the mouse to click on other object outside of the tab order. I created a form property to store the value, but not sure if I want to store the current object name as I loose focus on every object on the form to store the last one in every case, Not efficient. Any ideas on an efficient way to do this?
I forgot exactly how we solved the problem. I do remember we did have the same problem, though. If memory serves right, you can access last object under focus in the button's when event (ActiveControl will still refer to the last control having focus). Although I'm not 100% certain, only 98,9%. I suggest you to test it.
If it's not broken, fix it until it is.
My Blog