Results 1 to 11 of 11
  1. #1
    GraeagleBill's Avatar
    GraeagleBill is offline Experienced Old Geezer
    Windows 10 Access 2013 32bit
    Join Date
    Feb 2011
    Posts
    1,919

    Form's Close button


    I have a form with explicit conditional "SAVE" and "CANCEL" command buttons enabled or hidden that serve to control when the form closes. I can't seem to get Access to completely turn off the form's control box commands. (see pic)

    Click image for larger version. 

Name:	0Box.jpg 
Views:	27 
Size:	1.3 KB 
ID:	37922

    I have both "Control Box" and "Close Button" set to "No". What else needs to be disabled? One would think I'd encountered this situation long before now!

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,928
    I set those properties and the icons completely go away. Cannot replicate issue.

    Might also want to set MinMaxButtons to None.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    GraeagleBill's Avatar
    GraeagleBill is offline Experienced Old Geezer
    Windows 10 Access 2013 32bit
    Join Date
    Feb 2011
    Posts
    1,919
    Might also want to set MinMaxButtons to None.
    Yes, I had done that already.
    Click image for larger version. 

Name:	000.jpg 
Views:	24 
Size:	25.9 KB 
ID:	37923

    I wonder if the MS Acct Avatar that is included in that area has any baring?
    Click image for larger version. 

Name:	001.jpg 
Views:	26 
Size:	2.3 KB 
ID:	37924

    Uploaded the source to an Access 2010 system and it does the same thing.

  4. #4
    June7's Avatar
    June7 is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,928
    And how did you accomplish that avatar? What is the dropdown to the left?
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  5. #5
    GraeagleBill's Avatar
    GraeagleBill is offline Experienced Old Geezer
    Windows 10 Access 2013 32bit
    Join Date
    Feb 2011
    Posts
    1,919
    And how did you accomplish that avatar?
    It just showed up after having provided an image to my Microsoft Account. When I port the source to a A2010 system on another computer I just see a place-holder where the avatar otherwise appears. Again, I have no idea if the avatar has any baring on why I can't get the min/max close to become invisible.

    Here's a snippet of the drop-down screenshot:
    Click image for larger version. 

Name:	002.jpg 
Views:	20 
Size:	8.7 KB 
ID:	37925

  6. #6
    June7's Avatar
    June7 is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,928
    I have no idea what that is.
    I use Access 2010 and don't see anything like that, not even a 'placeholder'.
    This have anything to do with Office365?
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  7. #7
    GraeagleBill's Avatar
    GraeagleBill is offline Experienced Old Geezer
    Windows 10 Access 2013 32bit
    Join Date
    Feb 2011
    Posts
    1,919
    This have anything to do with Office365?
    Not that I can detect. I checked the apps list in Win 10 Pro but don't see anything "the cats dragged in". My Win 10 Pro is at 1809, as is the system where I checked.

    On my Win 10 Pro Office 2003 system, only the Min/Max button appears. Plus a search window in place of the Avatar seen on both the A2010 and A2013 systems.

    Something has changed somewhere! Setting the Control Box to "NO" should have taken care of this issue.

    I can successfully execute this statement:
    Code:
    Me.ControlBox = False
    but not these:

    Code:
    Me.CloseButton = False
    Me.MinMaxButtons = 0
    I get a 2136 Runtime error:
    Click image for larger version. 

Name:	003.jpg 
Views:	19 
Size:	31.8 KB 
ID:	37926

  8. #8
    June7's Avatar
    June7 is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,928
    I use Windows 10 Home and Office 2010.

    Sorry, cannot replicate this issue.

    Why would an Access form have a dropdown option for "Switch account"?
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  9. #9
    Micron is online now Virtually Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,801
    That's a good one. Not that I really needed a reason to not bother with an account image, but it seems I have one now. I've known for a long time that my account name shows up in the application title bar. I wonder if they ever noticed that according to the mandatory last name field in the subscription form that my surname is Withheld?

    Your subscription should entitle you to free technical support, no? Pretty sure it does.
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

  10. #10
    isladogs's Avatar
    isladogs is offline MVP / VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jan 2014
    Location
    Somerset, UK
    Posts
    5,977
    I have an image associated with my MS account. My account name appears in the title bar using Office 365 but the image doesn't.
    Colin, Access MVP, Website, email
    The more I learn, the more I know I don't know. When I don't know, I keep quiet!
    If I don't know that I don't know, I don't know whether to answer

  11. #11
    GraeagleBill's Avatar
    GraeagleBill is offline Experienced Old Geezer
    Windows 10 Access 2013 32bit
    Join Date
    Feb 2011
    Posts
    1,919
    Your subscription should entitle you to free technical support, no? Pretty sure it does.
    I'll pursue sometime next week.

    I haven't tested the event firing sequence yet, but hopefully I can do something like Mouse_Down and look at KeyCode for vbKeyClose so I can evaluate whether the conditions for a record SAVE/CLOSE have been satisfied. I tried to attend to the needed functionality in the Close Event but it's too late to get the answers needed in code......... like the current record has already been released.

    Continuing.............

    I can't find anywhere that allows me to specifically detect a MouseDown on the form's close control. If someone could answer that question it would be helpful. Maybe one of the other events? OnUnload? OnDeActivate? before the OnClose fires?

    As it is "Me.ControlBox = False" or "Me.ControlBox = True" has no effect on my form when executed in code, only when set in design view. And, Access does not allow me to toggle enabling the close button in code so it's like having one hand tied behind my back!

    The whole discussion about the display of the Window User's Avatar was a distraction relating to the OP. It does not seem to have any baring on the ControlBox issue.
    Last edited by GraeagleBill; 03-24-2019 at 02:14 PM.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Turn off close button on pop up form
    By jaryszek in forum Access
    Replies: 2
    Last Post: 12-13-2017, 07:29 AM
  2. close form button with additional criteria
    By woodpecker in forum Access
    Replies: 5
    Last Post: 10-21-2017, 02:31 PM
  3. HELP with close form button
    By acampbell in forum Macros
    Replies: 4
    Last Post: 01-20-2017, 09:34 AM
  4. Close Form button not working
    By RedGoneWILD in forum Forms
    Replies: 2
    Last Post: 06-25-2012, 07:02 AM
  5. Disable master form close button
    By Carpy01 in forum Forms
    Replies: 3
    Last Post: 12-31-2010, 05:41 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums