• How to hide a control on a form

    Author
    Topic
    #462867

    Hi,

    I have a database that opens a form in data entry mode or Edit mode from a switchboard, see screen shot below. My question is how do I hide the Find Account Combo box when in Add Mode?

    Any advice would be most welcome.

    Viewing 1 reply thread
    Author
    Replies
    • #1179437

      You can use the On Load event of the form. Let’s say that the combo box is named cboFindAccount:

      Code:
      Private Sub Form_Load()
        Me.[cboFindAccount].Visible = Not Me.DataEntry
      End Sub

      (The square brackets around the control name are only necessary if the name contains spaces or punctuation).

    • #1179439

      Thanks Hans – worked a treat. I knew it could be done but didn’t know the code to use.

    Viewing 1 reply thread
    Reply To: How to hide a control on a form

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: