Ask Experts Questions for FREE Help !
Ask
    skokie's Avatar
    skokie Posts: 1, Reputation: 1
    New Member
     
    #1

    Oct 6, 2007, 10:08 PM
    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
    ScottGem's Avatar
    ScottGem Posts: 64,966, Reputation: 6056
    Computer Expert and Renaissance Man
     
    #2

    Oct 7, 2007, 01:31 AM
    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

Not your question? Ask your question View similar questions

 

Question Tools Search this Question
Search this Question:

Advanced Search

Add your answer here.


Check out some similar questions!

VBA targeting #Ref! [ 2 Answers ]

I want to determine if a cell has returned the #REF! Error using an if statement, I have no idea how to address this. I've tried: If = "#REF!" Then.... To no avail, returns a type mismatch, any other ideas? :)

VBA and Excel for office97 [ 1 Answers ]

I have created a form in Excel using VBEditor in Excel and want to use the form to transfer data to Excel spreadsheet. I create an Excel file. Whenever the file is opened I want the form to load automatically. Then I use the form to enter data in specified cells. When I am through posing the data,...

Subform in datasheet view but need button [ 3 Answers ]

I need a duplicate record button to duplicate records in the subform which in is datasheet view. Is there is a way to display the button on the datasheet? Or if there is an easy way to put the button on the main form?


View more questions Search