Welcome to SPN

Register and Join the most happening forum of Sikh community & intellectuals from around the world.

Sign Up Now!

program the close Access button on the upper right hand corner of the screen

Discussion in 'Information Technology' started by Philip Leduc, Jul 28, 2006.

  1. Philip Leduc

    Philip Leduc
    Expand Collapse
    Guest

    How to I connect an event to the close Access button (white X on red square)
    ..
    The idea is when the user clicks this he will get a warning with the option
    to cancel before Access closes out completely
     
  2. Loading...


  3. Arvin Meyer [MVP]

    Arvin Meyer [MVP]
    Expand Collapse
    Guest

    You can't. But what you can do is to program a hidden form to cancel the
    event and give the user a message that he must close the form through your
    interface. Be careful to make sure the user understands why because irrate
    users can do significant damage to the database should they decide to just
    turn off the machine.
    --
    Arvin Meyer, MCP, MVP
    Microsoft Access
    Free Access downloads
    http://www.datastrat.com
    http://www.mvps.org/access

    "Philip Leduc" <ph.leducREMOVE@comcast.net> wrote in message
    news:uyg9Eb8dGHA.4276@TK2MSFTNGP03.phx.gbl...
    > How to I connect an event to the close Access button (white X on red

    square)
    > .
    > The idea is when the user clicks this he will get a warning with the

    option
    > to cancel before Access closes out completely
    >
    >
     
  4. Tom Wickerath

    Tom Wickerath
    Expand Collapse
    Guest

    RE: program the close Access button on the upper right hand corner of

    Hi Philip,

    I'm not sure what the "white X on red square" means, but you can use code
    similar to this behind a command button:


    Private Sub cmdQuit_Click()
    On Error GoTo ProcError

    Dim intResponse As Integer

    intResponse = MsgBox("Do you wish to quit this application?", _
    vbQuestion + vbYesNo, "Please Confirm Intent to Quit...")

    If intResponse = vbYes Then
    DoCmd.Quit
    End If

    ExitProc:
    Exit Sub
    ProcError:
    MsgBox "Error " & Err.Number & ": " & Err.Description, , _
    "Error in cmdQuit_Click event procedure..."
    Resume ExitProc
    End Sub



    Tom Wickerath, Microsoft Access MVP

    http://www.access.qbuilt.com/html/expert_contributors.html
    http://www.access.qbuilt.com/html/search.html
    __________________________________________

    "Philip Leduc" wrote:

    > How to I connect an event to the close Access button (white X on red square)
    > ..
    > The idea is when the user clicks this he will get a warning with the option
    > to cancel before Access closes out completely
     

Share This Page