Results 1 to 9 of 9
  1. #1
    2 Star Lounger
    Join Date
    Jul 2002
    Location
    Sacramento, CA
    Posts
    193
    Thanks
    3
    Thanked 1 Time in 1 Post
    I set the modal & pop-up properties on all my forms so the user doesn't have access to the ribbon controls. However, when print previewing a report, the user gets the standard Access Print Preview Ribbon. This has all worked well until recently when I collapsed the ribbon to provide more screen real estate. The down side of this is the close button in the upper left is for for the whole database not just print preview. With the preview ribbon fully displayed, the big red preview close button easily draws one's eye to it. But when the ribbon is collapsed and preview has been maximized, its natural for the user to click the upper right X. I've looked through the database options and have not found a way to toggle this upper right windows close button. Have I overlooked the option?

    Thanks,
    Marty

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts
    You need some Windows API functions for that. The attached text file contains code that you can copy into a standard module.

    To disable the close button in the Access application window, use

    SetCloseBox False

    To enable it, use

    SetCloseBox True
    Attached Files Attached Files

  3. #3
    Super Moderator
    Join Date
    Aug 2001
    Location
    Evergreen, CO, USA
    Posts
    6,623
    Thanks
    3
    Thanked 60 Times in 60 Posts
    As an alternative to what Hans suggested, you can try turning on tabs for each "window" so the user can right-click on the tab and choose Close. We do that in most of our aaps deployed under 2007, as you no longer have the option to display each window in the taskbar.
    Wendell

  4. #4
    2 Star Lounger
    Join Date
    Jul 2002
    Location
    Sacramento, CA
    Posts
    193
    Thanks
    3
    Thanked 1 Time in 1 Post
    Hans,

    Thanks for the input. I must be missing something as I have not been able to get it to work. Created a standard module and copied the code into it. I've tried placing the SetCloseBox False call first in the command button code right before the report is opened, then in the OnOpen of the report, and finally in the OnOpen of the application's main switchboard. In each instance the close button was not disabled.

    Appreciate your thoughts,
    Marty

  5. #5
    2 Star Lounger
    Join Date
    Jul 2002
    Location
    Sacramento, CA
    Posts
    193
    Thanks
    3
    Thanked 1 Time in 1 Post
    Wendell,

    Good alternative approach if I can't get Hans code to work. I had not used the tabbed option before.

    Thanks much,
    Marty

  6. #6
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts
    I have no idea whether it works in Access 2007, I don't use that version.

  7. #7
    Super Moderator
    Join Date
    Jun 2002
    Location
    Mt Macedon, Victoria, Australia
    Posts
    3,993
    Thanks
    1
    Thanked 45 Times in 44 Posts
    [quote name='mcowen' post='786740' date='30-Jul-2009 06:24']I set the modal & pop-up properties on all my forms so the user doesn't have access to the ribbon controls. However, when print previewing a report, the user gets the standard Access Print Preview Ribbon. This has all worked well until recently when I collapsed the ribbon to provide more screen real estate. The down side of this is the close button in the upper left is for for the whole database not just print preview. With the preview ribbon fully displayed, the big red preview close button easily draws one's eye to it. But when the ribbon is collapsed and preview has been maximized, its natural for the user to click the upper right X. I've looked through the database options and have not found a way to toggle this upper right windows close button. Have I overlooked the option?[/quote]

    I add the Close Print Preview command to the Quick Access Toolbar. Its Red Cross seems prominent enough that most people see it and use it.
    [attachment=84930:PrintPreview.gif]
    Attached Images Attached Images
    Regards
    John



  8. #8
    3 Star Lounger
    Join Date
    Dec 2000
    Location
    Manassas, Virginia, USA
    Posts
    363
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Is this something that has to be set on each user's computer? Once I added the close print preview button to the quick access toolbar it was there in every database I opened on the one computer I am using to test Access 2007. This made me think it is an option that has to be set on each computer rather than in a database which can be copied to various servers which would all contain this option setting.
    Judy Jones, Computer Training Specialist
    Manassas, Virginia

  9. #9
    Super Moderator
    Join Date
    Aug 2001
    Location
    Evergreen, CO, USA
    Posts
    6,623
    Thanks
    3
    Thanked 60 Times in 60 Posts
    [quote name='JudyJones' post='787493' date='04-Aug-2009 07:17']Is this something that has to be set on each user's computer? Once I added the close print preview button to the quick access toolbar it was there in every database I opened on the one computer I am using to test Access 2007. This made me think it is an option that has to be set on each computer rather than in a database which can be copied to various servers which would all contain this option setting.[/quote]
    Yes it is - the Quick Access toolbar is a setting of Access on the workstation. Other options such as displaying the ribbon, or not displaying the ribbon, or showing tabs on windows, can be set for each database. I suspect you might be able to programatically modify the Quick Access toolbar, but I have not tried it.
    Wendell

Posting Permissions

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