the problem with your approach (code), is that you will find it hard to insert to the proper Page the subform. I've googled it an found none so far. the best approach you have is to design your form and create as many Pages with that many subform in it. then make those pages Visible property to No.
you also need a global counter variable as to how many Pages are visible.
you may also need a Table to save gintPages value.
on a module you may create:
Global gintPages As Integer
Public Function initPages()
gintPages = dlookup("Value", "theTable")
now create a macro (autoexec) that will RunCode the initPages() function.
so that everytime your app starts, ginitPages will be initialized as to how many
pages you have so far.
next on the Load event of your form, check each Page caption against the strInput.
if not found, increment gintPages and make the corresponding Page visible, and set its caption.
you can now set the SourceObject of the subform.
Me.subformName.SourceObject="table." & strInput
on the Unload event of your form, save gintPages to the table again.
btw I haven't tested it yet, only on my imagination.