I have two sub-forms on a main form. The 2nd subform is set to visible = false when the main form opens. But on 1st subform, when the user clicks a command button in the 1st subform I want the 2nd subform to become visible within the main form. But with the onclick code I have currently the 2nd subform, named "subfrmSearchContractsDS",
is opening outside the main form and I cannot figure out why.
Here is my onclick code:
Dim strWhereCondition As String
'several lines of code here for the strWhereCondition
DoCmd.OpenForm "subfrmSearchContractsDS", acFormDS, , strWhereCondition, acFormReadOnly, acHidden
Forms!subfrmSearchContractsDS.Visible = True