Is there any way to tell which form just lost the focus? I have a field on a form that I would like to populate with a value from the form that preceeded it, but that form could be one of a few different forms. Any ideas?
I don't think there's a specific 'right' way to do this but here is a possible method:
You could create a module with a global variable:
Code:
Global LastForm as String
And whenever a form loses focus, it could update this variable with its name.
This way, the variable could read/written from anywhere to check which form last lost focus.
Small warning: Whenver your database is started up, you might want to initially give the LastForm variable some initial state so you don't have the possibility of playing around with a null variable by accident.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.