Full Version: Is possible to tell what object your moving to?
UtterAccess Discussion Forums > Microsoft® Access > Access Forms
WSplawn
I seem to remember that it is possible in code to determine what object the user is moving to.

I have a sub form in a master form. I also have some code in the exit event of the sub form control. If the user is in the sub form and clicks on a listbox in the master, I want the code (in the exit event) to do one thing, if he clicks on a text box, I want it to do another. I seem to remember there is a function or something you can call to make this determination but I don't recall the name. Is this possible?

Thank you
theDBguy
Hi Woody,

I know that there are the following:

Screen.ActiveControl

and

Screen.PreviousControl

But I don't think that there is something like:

Screen.NextControl

Is that what you mean?
jleach
Or maybe the GotFocus event?
WSplawn
Hi DBGuy,

Yes, I think you are right. My memory was incorrect.

Thank you for responding.
theDBguy
yw.gif
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.