Results 1 to 5 of 5
  1. #1
    Techno is offline Advanced Beginner
    Windows 10 Access 2016
    Join Date
    May 2023
    Posts
    31

    Event when user clicks on X on the top right of the login form

    I have made a login form that opens when any user opens the access file and want to make the login form so that the user is not able to bypass it.

    There are 3 possible ways to escape the login form.

    1. Login command button - It take the user after user validation to a different form.



    2. Cancel command button - I want to close the Access file when Cancel button is pressed (I still don't have the code, but probably will figure it out).

    3. The X on the top right of the form Click image for larger version. 

Name:	c.jpg 
Views:	27 
Size:	1.3 KB 
ID:	50333- This is where the problem is....how can I disable it? Is there a way to remove it from the form? If not, what event programming can disable it? Would be grateful for any help.

  2. #2
    Edgar is online now Competent Performer
    Windows 8 Access 2016
    Join Date
    Dec 2022
    Posts
    274
    You're looking for the close event.

    Code:
    Private Sub Form_Close()
      Application.Quit
    End Sub
    Play with the form's properties. If you set borderstyle to none with and it's popup, none of the buttons appear. But there is also a property to disable the close button.

  3. #3
    Techno is offline Advanced Beginner
    Windows 10 Access 2016
    Join Date
    May 2023
    Posts
    31
    Thanks, it worked.

  4. #4
    moke123's Avatar
    moke123 is offline Me.Dirty=True
    Windows 11 Office 365
    Join Date
    Oct 2012
    Location
    Ma.
    Posts
    1,654
    But there is also a property to disable the close button.
    The property Edgar's referring to is the Control Box property. Set that to no.
    If this helped, please click the star * at the bottom left and add to my reputation- Thanks

  5. #5
    Techno is offline Advanced Beginner
    Windows 10 Access 2016
    Join Date
    May 2023
    Posts
    31
    Thank you...

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

Similar Threads

  1. Replies: 12
    Last Post: 04-20-2021, 01:23 AM
  2. Replies: 2
    Last Post: 04-17-2015, 10:59 AM
  3. Replies: 3
    Last Post: 01-15-2015, 12:23 PM
  4. Replies: 4
    Last Post: 06-01-2013, 11:32 PM
  5. How to not add Record if User clicks a BUTTON
    By taimysho0 in forum Programming
    Replies: 7
    Last Post: 12-06-2011, 10:49 AM

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