Results 1 to 10 of 10
  1. #1
    Bronze Lounger
    Join Date
    Jan 2001
    Location
    Virginia, USA
    Posts
    1,560
    Thanks
    37
    Thanked 1 Time in 1 Post

    Min, Close Buttons don't show (XP)

    I've built a form and set its properties as follows:

    Min Max Buttons: Min Enabled
    Close button: Yes

    But none of said buttons appear on the form in Form View. Why not?

  2. #2
    Silver Lounger
    Join Date
    Jun 2002
    Location
    Cheadle, Staffordshire
    Posts
    2,177
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Min, Close Buttons don't show (XP)

    Lucas
    Check the properties to see if "Control Box" has "Yes" next to it.

    Check your border style, Thin or Sizable should do the trick.

  3. #3
    Bronze Lounger
    Join Date
    Jan 2001
    Location
    Virginia, USA
    Posts
    1,560
    Thanks
    37
    Thanked 1 Time in 1 Post

    Re: Min, Close Buttons don't show (XP)

    Hi, Dave, and thanks for that reply! I played around with those settings, and it appears I have to have the control box property set to Yes to get any of these buttons to show at all. Border style "Dialog" doesn't allow any buttons to show; "Thin" with control box "Yes" will display the buttons with Maximize disabled. Well, I guess that's OK. Better will be to add a command button to close the form and get rid of all those standard buttons. Interesting.

  4. #4
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Min, Close Buttons don't show (XP)

    1. If you set Control Box to No, there will be no System menu on the left hand side of the title bar of the form, and no Minimize, Maximize/Restore or Close button on the right hand side, regardless of the Border Style setting.

    2. If you set Border Style to Dialog (and Control Box to Yes), there will be no Minimize and Maximize/Restore buttons, regardless of the value of the Min Max Buttons property. There will be a Close button; it will be disabled if the Close Button property is set to No, enabled otherwise.

    3. If you set Border Style to Sizeable or Thin (and Control Box to Yes), there will be a Minimize, Maximize/Restore and Close button; by default all three will be enabled (!), but you can disable any one of them by changing the Min Max Buttons and Close Button properties.

    4. If you set Border Style to None, the form will have no title bar and hence no System menu and no Minimize, Maximize/Restore or Close button.

  5. #5
    Bronze Lounger
    Join Date
    Jan 2001
    Location
    Virginia, USA
    Posts
    1,560
    Thanks
    37
    Thanked 1 Time in 1 Post

    Re: Min, Close Buttons don't show (XP)

    Thanks, Hans. Your brief but thorough discussion makes me want to know more. I want to probe a little into the mind of a real developer! <img src=/S/doctor.gif border=0 alt=doctor width=25 height=33>

    You, the developer, have all those choices before you. When you, Hans, are designing a form, how do you decide what to do? Why do you choose Border Style: Thin, Dialog, None or whatever? How do you decide whether to allow Min/Max/Close buttons?

  6. #6
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Min, Close Buttons don't show (XP)

    I don't consider myself a "real developer", but for what it's worth, here is what I do.

    I usually set Border Style to Dialog (making the form non-resizable, but with a title bar; Thin would work as well) and Control Box to No, to hide the "x" Close button in the upper right corner, and so force the user to use the Close button provided by me. Auto Center is yes.

    In most cases, I set Record Selectors to No. Scroll Bars to None in a single form and to Vertical Only in a continuous form. I never use a datasheet form.

    In a few cases I set Border Style to None and Back Color for all visible sections to -2147483636, i.e. the application background. This makes the form blend with the application background, making it appear as if it's maximized, yet without the Minimize, Restore and Close buttons that normally appear in a maximized form. I don't like the workarounds that use Windows API functions to simulate a maximized form; they caused too many problems.

    I'll be watching this space to see what others do.

    (Can you tell I'm a control freak?) <img src=/S/grin.gif border=0 alt=grin width=15 height=15>

  7. #7
    Silver Lounger
    Join Date
    Jun 2002
    Location
    Cheadle, Staffordshire
    Posts
    2,177
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Min, Close Buttons don't show (XP)

    In my designs, I like to Set my main forms to :-

    Maximise: On_Open Event - thru VBA

    Control Box: Yes
    Min/Max: No
    Close: Yes

    Border Style Sizable, (Don't have any preference)
    Default View: Single Form
    Allow Datasheet View: No (This can vary, dependent on form functuality)
    Scrollbars: No
    RecordSelectors: No
    Navigation Buttons: Mainly No
    Auto Centre: Yes
    PopUp: Yes
    Cycle: Current Record
    Allow Design Changes: Design View Only

    Using the main form, I like to see any other forms relating to this, as Popups:

    Movesize: On_Open Event - thru VBA

    Control Box: Yes
    Min/Max: No
    Close: Yes

    Border Style Sizable, (Don't have any preference although I should really use dialog or Thin)
    Default View: Single Form
    Allow Datasheet View: No (This can vary, dependent on form functuality)
    Scrollbars: No
    RecordSelectors: No
    Navigation Buttons: Mainly No
    Auto Centre: No
    PopUp: Yes
    Modal: Yes
    Cycle: Current Record
    Allow Design Changes: Design View Only

    All forms Detail : 15132390
    Labels : Back Color 13816530
    Border Color : 12500670
    Texts: Special Effect - Flat with 12500670 Border

    This works for me. I like the user to work on one record at a time, although where multiple records are to be viewed,
    I like to try to use datasheet or purpose built forms similar to a grid effect.

  8. #8
    4 Star Lounger SteveH's Avatar
    Join Date
    Jan 2001
    Location
    Chelsea, Gtr London, United Kingdom
    Posts
    587
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Min, Close Buttons don't show (XP)

    FWIW

    I usually set the BorderSize to sizeable and have this code in the Form Resize event to prevent users re-sizing the form

    Private Sub Form_Resize()
    On Error Resume Next
    DoCmd.RunCommand acCmdSizeToFitForm
    End Sub

    Just another way of doing it.
    Steve H
    IT Lecturer/Access Developer
    O2K SR3/O2010; Win7Pro

  9. #9
    Bronze Lounger
    Join Date
    Jan 2001
    Location
    Virginia, USA
    Posts
    1,560
    Thanks
    37
    Thanked 1 Time in 1 Post

    Re: Min, Close Buttons don't show (XP)

    Hans: Thank you very much! I remember recently you replied to a message where you stated your case for not allowing the user to close a form with the standard Close button. You also furnished code to run behind a command button to close the form. As I recall, the code did more than just close the form--it did some magic that prevented database corruption. You said you rarely encounter corruption now that you stopped allowing users to use the "Close" button. Do you happen to have the post number handy? (This is where I really, really miss the Search engine!)

  10. #10
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Min, Close Buttons don't show (XP)

    The code I have behind my Close command button is simple:

    Private Sub cmdClose_Click()
    DoCmd.Close acForm, Me.Name, acSaveNo
    End Sub

    If the user has changed the sort order in the form, this counts as a change in the design, and by default, Access will try to save this design change. The last argument (acSaveNo) specifies that the design of the form shouldn't be saved. This setting does not prevent the current record from being saved automatically.

Posting Permissions

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