|
-
Jun 20th, 2000, 06:13 PM
#1
Thread Starter
Addicted Member
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.
-
Jun 20th, 2000, 06:56 PM
#2
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
-
Jun 20th, 2000, 07:50 PM
#3
Thread Starter
Addicted Member
Thanks...
I am a real novice when it comes to API, can you give me an example?
-
Jun 25th, 2000, 12:47 PM
#4
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
-
Jun 25th, 2000, 09:42 PM
#5
Thread Starter
Addicted Member
Anyone?
Thanks for your help anyway, anyone else got any ideas?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|