Consulting

Results 1 to 7 of 7

Thread: get rid of the "X"

  1. #1

    get rid of the "X"

    I have a user who likes to click on the "X" in the right corner of each screen to exit a screen, but keeps clicking the "x" at the top of screen, thus closing MS Access.

    Is there any way to turn off either or both of those X's to force him to use my screen closing icons?

  2. #2
    VBAX Expert Imdabaum's Avatar
    Joined
    Jun 2006
    Posts
    652
    Location
    Honestly I would be tempted to create a hidden form that loads on statup if his username is detected.

    Then on the UnLoad event insert something like,
    [vba]
    For i=0 TO 1000
    If MsgBox("Do you realize how much money you pay me to bypass " & _
    "your responsibility to train yourself?", _
    vbQuestion + vbYesNo, "Responsible Much?") <> vbYes
    MsgBox "Stop using this 'X' button!", vbExclamation, "Need Tutorial?"
    Else
    MsgBox "I want a raise for putting up with your lack of dexterity...", _
    vbExclamation, "Need Tutorial?"
    Next i
    [/vba]

    But more appropriately to answer your question if your Main Form is always visible, then you may be able to put a checker in the UnLoad event.

    [vba]
    Sub UnLoad()
    If MsgBox("Do you really want to quit?", vbYesNo, "Exit Application") <> vbYes
    Cancel = True
    End If
    End Sub
    [/vba]

    From what I understand the Quit command bypasses most other events. But the Unload event will force the quit command to wait.
    Someday I'll understand everything...
    Even then...I'll still pretend I'm a beginner.

  3. #3
    yep, and worse, the guy is the President of the company. How do you tell the boss that he's ugly?

  4. #4
    VBAX Expert Imdabaum's Avatar
    Joined
    Jun 2006
    Posts
    652
    Location
    Quote Originally Posted by DBinPhilly
    yep, and worse, the guy is the President of the company. How do you tell the boss that he's ugly?

    Well from my philosophy you don't... not unless you are willing to offer him plastic surgery. If you want to point out a problem I feel you should always partner it with a solution. Otherwise you're just contributing to the problem...

    As the old saying goes, if you aren't working to solve the problem you are part of it.
    Someday I'll understand everything...
    Even then...I'll still pretend I'm a beginner.

  5. #5
    Quote Originally Posted by Imdabaum



    Well from my philosophy you don't... not unless you are willing to offer him plastic surgery. If you want to point out a problem I feel you should always partner it with a solution. Otherwise you're just contributing to the problem...

    As the old saying goes, if you aren't working to solve the problem you are part of it.
    or, as Stephen Wright might say, if you're not part of the solution, then you are part of the precipitate.

  6. #6
    VBAX Guru
    Joined
    Mar 2005
    Posts
    3,296
    Location
    DBinPhilly, I have had the code that you need, it disables the X.
    I will see if I can find it.

  7. #7

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •