A form and a subform work together because of a relationship that has been
established between fields in the underlying tables (or queries, which
inherit the same relationships as the tables on which they are based). You
would not open the subform with my suggestion, since it would already be
open, but would rather allow it to be seen.
The default name for the subform control is the name of the form. If you
gave the subform the name [Z-tblAudits Subform - 2 buttons], then the After
Update code in a combo box on the main form would be:
Me.Z-tblAudits Subform - 2 buttons.Visible = True
Any reference to subforms and subform controls assumes you have a proper and
functional relationship between your tables. I could probably be more
specific if I knew something about what your database does, and if I
understood the relationship behind the form/subform combination.
Robert G said:
I just tried your suggestion, and an error on the following entry in AFter
Update. is anything obviously wrong ?
=[Forms]![Z-tblAudits Subform - 2 buttons].Visible=Yes
--
Robert G
Robert G said:
The subform can be hidden as you suggest, but I can't find the syntax to open
the subform. The subform is a datasheet view of a query, that is populated
when 2 combo-boxes are selected. At present, I can only get the form to open
one line at a time
Private Sub cmdShowInfo_Click()
DoCmd.OpenForm "Z-tblAuditorbyAudtistrial2with2 Subform"
End Sub
Are you saying have the sub-form open but hidden, and then show populated
when 2nd combo-box selected. Do you have any code for this ?
Many thanks in advance, Robert