Capture Quit event in order to Disconnect ADP project before leave

  • Hi,

    When you open an adp project he tries (by default) to connect to the server with the last known connection info. As I created my own login screen I want to start each time with an unconnected adp project. Therefor I'm looking for an events that fires when a users closes the main access window of an adp project, or when Application.Quit is executed from vba.

    The I intend to use to disconnect the adp project is ...

    Application.CurrentProject.Connection.Close

    Application.CurrentProject.OpenConnection ""

    Application.CurrentProject.RemovePersonalInformation = True

    Problem I have is that I can't find the proper event to add this code. I would need to capture for example the event when the users clicks the [X] close button of the main access window.

    Rgds, Bart

  • You need to create a hidden form that loads on startup.  When the user quits the app (using any method), your hidden form will close.  Use the Close event of this form to disconnect your app.

  • Ok. Great suggestion.

    Can I conclude form this solution that there is no application quit event that can be captured. Obvious this would result is more straight forward coding.

  • Yes, there is no App.quit event, unfortunately.

    Good Luck

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply