How to duplicate "Refresh All"? on a Microsoft Access form

Posted on 2011-05-10
Last Modified: 2012-05-11
I have  a form (main) that has a query as the recordsource.  On this form, I have a command button that opens another form (administration) giving a user some options.  One of them is a check box that, when checked, makes a subform on the main form visible.  I would like the subform to become visible immediately when the box is checked.  Everything works fine if the form is loaded, but I want to prevent the user from having to reload or use the "Refresh All" button on the ribbon.  What would be the best solution?
Question by:hbatt
    LVL 1

    Expert Comment

    Use a toggle button seperate from your recordset sub.
    LVL 77

    Expert Comment

    I assume you are using the Visible property on the subform container control on the main form, to set the visibility.

    So in the afterupdate event procedure of the relevant checkbox you do...

    forms!mainformname!subformcontainercontrolname.visible = true

    LVL 77

    Accepted Solution

    Well I guess you should add a test..

    forms!mainformname!subformcontainercontrolname.visible = me.checkboxname

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Looking for New Ways to Advertise?

    Engage with tech pros in our community with native advertising, as a Vendor Expert, and more.

    This collection of functions covers all the normal rounding methods of just about any numeric value.
    Deploying a Microsoft Access application in a Citrix environment is not difficult but takes a few steps. However, Citrix system people are often of little help, as they typically know next to nothing about Access. The script provided here will take …
    With Microsoft Access, learn how to specify relationships between tables and set various options on the relationship. Add the tables: Create the relationship: Decide if you’re going to set referential integrity: Decide if you want cascade upda…
    The viewer will learn how to create a normally distributed random variable in Excel, use a normal distribution to simulate the return on an investment over a period of years, Create a Monte Carlo simulation using a normal random variable, and calcul…

    761 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    8 Experts available now in Live!

    Get 1:1 Help Now