• Access Tips From Xlteq the Access Developers Hide and Unhide multiple controls at once

  • Access Development Tips 

    If you have a form with several controls in the same area you want to hide/unhide, instead of hiding or unhiding them one at a time, simply place a rectangle over the top of the controls and hide/unhide that instead.

    For example, here’s a form with some controls on and we want to hide/unhide the address controls.

     

    Hide and Unhide multiple controls at once image 1

     

    Instead of writing code for each control as follows:

     

    Hide and Unhide multiple controls at once image 2

    We put a rectangle over these controls and set it’s properties as such (NB the rectangle will now cover the controls when you view the form in design mode):

     

    Hide and Unhide multiple controls at once image 3

     

    Name:                 recHide

    Visible:                No

    Back Style:          Normal

    Back Colour:      <make same as form colour>

    Border Style:      Transparent

    Then, when we want to hide the controls, we just use one line of code.

     

    Hide and Unhide multiple controls at once image 4

    Need help with your Access Database?

    Contact Us for a Free Consultation and Quote

    You can call us now on 020 3817 6945 or click on contact us below.