It would not be a where clause.
You use the Link Master Fields and Link Child Fields properties of the
subform control to identify the relationships between the main form data and
the subform data. In your code, you will have to identify those properties
when you change subforms.

Signature
Dave Hargis, Microsoft Access MVP
> Thanks to help from this group I now have an option group on a from that
> allows me to select which subform to display. The code to do that is list
[quoted text clipped - 26 lines]
>
> Thank you