Open subform via command button

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • kledki
    New Member
    • Jul 2019
    • 20

    Open subform via command button

    I was wondering if it is possible to open a subform via clicking a command button on the main form? Just looking for a yes or no here so that I have a better idea of what possibility to pursue. Thanks!
  • twinnyfo
    Recognized Expert Moderator Specialist
    • Nov 2011
    • 3653

    #2
    Kledki,

    This is not a yes or no answer, because it is a faulty question. Typically, you don’t “open” a Sub-Form, because if it is a sub-form, it is opened when you open the parent form. However, you could make it visible or not based upon the usage of a command button.

    Comment

    • NeoPa
      Recognized Expert Moderator MVP
      • Oct 2006
      • 32633

      #3
      That's the perfect answer for that question. We'll happily expand on that for you if you require but I guess, from your question, you're probably not looking for more there.

      For now you at least know what is and isn't possible, and what makes sense.

      Comment

      • twinnyfo
        Recognized Expert Moderator Specialist
        • Nov 2011
        • 3653

        #4
        Code:
        Me.SubformName.Visible = True/False
        Use that in the OnClick Event of the Command button.

        Comment

        Working...