PDA

View Full Version : Here i go again...How to close a subform?



mud2
03-28-2006, 09:52 PM
My MainForm has a subform. I want a command button on the main form to close the subform.
DoCmd.Close acForm , "Subform" Used to work (If I remember!) Now nothing happens...not even an error message!

Also, same question for a command botton in the subform?

matthewspatrick
03-29-2006, 05:38 AM
Why not just hide it?

Assuming you want your main form's command button to toggle the Visible property:


Me!NameOfSubformControl.Visible = Not Me!NameOfSubformControl.Visible