Ask Me Help Desk

Ask Me Help Desk (https://www.askmehelpdesk.com/forum.php)
-   Access (https://www.askmehelpdesk.com/forumdisplay.php?f=441)
-   -   VBA Access Hide Subform, Box (https://www.askmehelpdesk.com/showthread.php?t=137887)

  • Oct 6, 2007, 10:08 PM
    skokie
    VBA Access Hide Subform, Box
    Hello all,
    I'm trying to create an application using access VBA. Unfortunately, I'm a novice programming in VBA. I'd like to know the VBA code to hide and show a subform or a box created in a form.

    Thanks

    Sean
  • Oct 7, 2007, 01:31 AM
    ScottGem
    Every control on a form has a Visible property. Setting this property to No hides the control, setting it Yes displays it. So the line:

    Me.subformname.Visible = No

    would hide it. If you are looking to hide subforms, though, I would consider using a Tab control. A hidden subform will leave a big blank space on your form and that will look unprofessional. By organizing the subform in a tab control, you can hide the tab control page that the subform is on without leaving a gaping hole on the form.

    P.S. if you want to learn VBA programming, you might find this of interest:
    Amazon.com: Microsoft Office Access 2007 VBA (Business Solutions): Books: Scott B. Diamond

  • All times are GMT -7. The time now is 12:41 AM.