You have several options.
One command way is to remove the "source object" setting of the sub form control. Since the control (a subform control) does not have "pointer" to the sub form, the sub form will not load nor display.
the code to thus set this (behind your button would be this):
Me.MySubFormControl.SourceObject = "tblMain2"
so, just set the source object setting to the sub form you want to display/load.
Be CAREFULL during the form edit WHEN you blank out (remove) the source object setting of the sub form control, often messing during editing will also BLOW OUT the link master and child field settings. They usually stick, but can go away.
The next possible?
In place of setting the source object, you modify the sub form, and REMOVE its data source.
Now in code behind that button, you can go:
me.MySubFormControl.Form.Source = "SELECT * from child table"
Once again, when you do the above, often the link master/child settings can go away. In some cases, you thus can go:
me.MySubFormControl.Form.Source = "SELECT * from childTable where parent_id = " & me!id
Now of course you replace parent_id with the column name used to relate to the parent form.
I think the source object is a better choice, since then not even the sub form is rendered or even loaded when the main form loads.
The only issue is that OFTEN access will attempt to set/change the link master/child settings, so you might consider setting the link master and link child field settings in code also (right before the source object line of code).