-
Is there any way either in VBA or with an API call to catch when a user closes Access (The Database Window). I cannot for the life of me find out how to do this.
My current solution/idea is to force the user to use command buttons by disabling menu items that close the DB Window.
-
Hi!
I don't know much about VBA but in VB I'd try to retrieve the hWnd of Access Main-Window with the FindWindow API.
Then I'd SubClass the window and lurk for WM_Quit or WM_Close.
I don't know if subclassing is possible in VBA but that's the way I'd try in VB
Hope this helps you ... :)
________________
regards,
da_bob
-
Thanks...
I am a real novice when it comes to API, can you give me an example?
-
Hi again
Sorry, I promised you too much.
It seems not to work because theres no AdressOf() operator in VBA.
That seems to make subclassing impossible.
In VB6 it works when you subclass the WM_DESTROY.
__________________
regards
da_bob
-
Anyone?
Thanks for your help anyway, anyone else got any ideas?