Jun 9 2009, 06:58 PM
I have a sub sub form on a main form,the main form and 1st subform are set to display as a single forms,the 2nd subform is set to datasheet view.
I have a 3rd subform that I would only like to become visible after the user selects a specific value from a combo box on the 2nd subform.
I "think" I have worked out that Access doesn't allow you to hide / unhide subforms if the datasheet view is used? If this is correct, is there some sort of workaround?.The 'hidden' subform could display in datasheet or single form view.
Jun 9 2009, 07:21 PM
You can hide the third subform regardless of the type of form that is displayed. If the name of the third subforms control is MyThirdSubformControl then you can set that controls Visible property to Yes or No using code. Try it. Use the Wizard to add the third subform to the main form and in design view of the main form set the Visible property of the new subform control to No...the subform should not be visible when you open the main form in normal view.... By the way, you can't put a subform on a form that is in datasheet view so I am assuming the third subform is on the main form and not in the second subform...
If Me.NameOfComboBox = "Something" Then
Me.Parent.NameOfThirdSubformControl.Visible = True
Jun 9 2009, 07:59 PM
Many thanks,works a treat!
Jun 9 2009, 08:02 PM
You are very welcome and I'm glad I was able to assist...
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here