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

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?
Harry BattDirector of DevelopmentAsked:
Who is Participating?
 
peter57rCommented:
Well I guess you should add a test..

forms!mainformname!subformcontainercontrolname.visible = me.checkboxname
0
 
Chad-MCommented:
Use a toggle button seperate from your recordset sub.
0
 
peter57rCommented:
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

0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.