Results 1 to 5 of 5

Thread: Catch Application On Quit

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    May 2000
    Location
    London Occupation: Desktop Developer
    Posts
    141

    Angry

    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.

  2. #2
    Guest
    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

  3. #3

    Thread Starter
    Addicted Member
    Join Date
    May 2000
    Location
    London Occupation: Desktop Developer
    Posts
    141

    Question Thanks...

    I am a real novice when it comes to API, can you give me an example?

  4. #4
    Guest

    Unhappy

    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

  5. #5

    Thread Starter
    Addicted Member
    Join Date
    May 2000
    Location
    London Occupation: Desktop Developer
    Posts
    141

    Question 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
  •  



Click Here to Expand Forum to Full Width