Make login form controls visible/invisible based on field selection RRS feed

  • Question

  • Hi, how can I make controls on my login form visible when I press the "login" button on my form?
    Thursday, June 28, 2018 4:24 PM

All replies

  • Hi Nick,

    The normal syntax looks something like this:

    Me.ControlName.Visible = True


    Me.ControlName.Visible = False

    True shows them and False hides them.

    Is this what you mean?

    Thursday, June 28, 2018 4:34 PM
  • Hi, I'm creating a login form and I'm really just starting out in VBA. I want to make certain parts of my form invisible until the user puts in all their information and hits "login". After they hit "login", I want my "Terms and Conditions" part of the form to be visible.
    Thursday, June 28, 2018 4:37 PM
  • By default set the Visible property of the 'Terms and Conditions' control(s) to False (No) in the properties sheet.  In your code in the login button's Click event procedure set the Visible property of the control(s) to True with the syntax:

        Me.[NameOfControlGoesHere].Visible = True

    If there is more than one control, do the same for each.

    Ken Sheridan, Stafford, England

    Thursday, June 28, 2018 5:09 PM
  • Is this a duplicate post?
    Thursday, June 28, 2018 6:25 PM
  • There seems to be a duplicate post here.
    Thursday, June 28, 2018 6:26 PM
  • Yeah, sorry.

    Thursday, June 28, 2018 6:29 PM
  • Yeah, sorry.

    Hi Nick,

    Not a big deal, just wanted to make sure others are aware to avoid any confusion.

    Good luck!

    Thursday, June 28, 2018 6:44 PM
  • Hello NickNotarianni1,

    What's the state of the thread? If your original issue has been resolved, I would suggest you mark the helpful reply to close the thread. If not,  please feel free to let us know your current issue.

    Best Regards,


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Friday, June 29, 2018 6:10 AM