Close button bug

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Bruce

    Close button bug

    Hello,

    I have a form in an Access 2003 application which opens maximized.
    Its CloseButton property is set to false. On this form I have a
    command button that opens a report in preview mode. The report opens
    fine. It opens maximized as one would expect. However, the report
    preview window's close button is disabled which is confusing to my
    users (they have to click the resize button on the preview window
    which then restores the close button). Office SP3 does not seem to
    help. Is there a better workaround than this to restore my report
    preview close button?

    I can reproduce this behavior in the Northwind db as follows:

    Add a docmd.Maximize to the load event of the Categories form.
    Add a command button to the Categories form.
    In the command button's click event add

    DoCmd.OpenRepor t "Summary of Sales by Year", acViewPreview, , ,
    acWindowNormal

    I open the Category form in form view and click the command button and
    note that the report preview's close button is not visible.

    Bruce
  • Tom van Stiphout

    #2
    Re: Close button bug

    On Wed, 13 Feb 2008 13:35:46 -0800 (PST), Bruce
    <deluxeinformat ion@gmail.comwr ote:

    EXCELLENT message.
    I know it doewsn't help right now, but In A2007 the problem goes away:
    a form can have the close button off, while a subsequent report has it
    on and can be closed that way.
    You may want to examine if you REALLY need to suppress the Close
    button. There rarely is a good case for it, with the Unload event that
    can be cancelled:
    if SomeConditionsA rentRight() then
    Cancel = True
    Msgbox "Yo! Can't close right now!"
    end if
    and a Close event for processing while the form is actually going to
    close.

    -Tom.

    >Hello,
    >
    >I have a form in an Access 2003 application which opens maximized.
    >Its CloseButton property is set to false. On this form I have a
    >command button that opens a report in preview mode. The report opens
    >fine. It opens maximized as one would expect. However, the report
    >preview window's close button is disabled which is confusing to my
    >users (they have to click the resize button on the preview window
    >which then restores the close button). Office SP3 does not seem to
    >help. Is there a better workaround than this to restore my report
    >preview close button?
    >
    >I can reproduce this behavior in the Northwind db as follows:
    >
    >Add a docmd.Maximize to the load event of the Categories form.
    >Add a command button to the Categories form.
    >In the command button's click event add
    >
    DoCmd.OpenRepor t "Summary of Sales by Year", acViewPreview, , ,
    >acWindowNorm al
    >
    >I open the Category form in form view and click the command button and
    >note that the report preview's close button is not visible.
    >
    >Bruce

    Comment

    • Bruce

      #3
      Re: Close button bug

      On Feb 13, 5:01 pm, Tom van Stiphout <no.spam.tom7.. .@cox.netwrote:
      On Wed, 13 Feb 2008 13:35:46 -0800 (PST), Bruce
      >
      <deluxeinformat ...@gmail.comwr ote:
      >
      EXCELLENT message.
      I know it doewsn't help right now, but In A2007 the problem goes away:
      a form can have the close button off, while a subsequent report has it
      on and can be closed that way.
      You may want to examine if you REALLY need to suppress the Close
      button. There rarely is a good case for it, with the Unload event that
      can be cancelled:
      if SomeConditionsA rentRight() then
      Cancel = True
      Msgbox "Yo! Can't close right now!"
      end if
      and a Close event for processing while the form is actually going to
      close.
      >
      -Tom.
      >
      Hello,
      >
      I have a form in an Access 2003 application which opens maximized.
      Its CloseButton property is set to false. On this form I have a
      command button that opens a report in preview mode. The report opens
      fine. It opens maximized as one would expect. However, the report
      preview window's close button is disabled which is confusing to my
      users (they have to click the resize button on the preview window
      which then restores the close button). Office SP3 does not seem to
      help. Is there a better workaround than this to restore my report
      preview close button?
      >
      I can reproduce this behavior in the Northwind db as follows:
      >
      Add a docmd.Maximize to the load event of the Categories form.
      Add a command button to the Categories form.
      In the command button's click event add
      >
      DoCmd.OpenRepor t "Summary of Sales by Year", acViewPreview, , ,
      acWindowNormal
      >
      I open the Category form in form view and click the command button and
      note that the report preview's close button is not visible.
      >
      Bruce
      Hi Tom,

      Good suggestion. I imagine I will end up using the form's Unload
      event and re-enabling its Close button. It'd just be nice if Access
      did what it was supposed to. Thanks for the helpful reply!

      Bruce

      Comment

      Working...