Link to home
Start Free TrialLog in
Avatar of AbacusInfoTech
AbacusInfoTech

asked on

Need help dynamically filtering subforms so I can re-use them.

Probably easy for an Access Whiz, but I just don't get it.

I wish to use the SAME subform twice on a main form, but wish the results they display to be different. I want to do this so I do not have to design two subforms which are identical apart from the results they display.

For example, [subform1] will show items from my orders table that are ordered, [subform2] will show items from my orders table that are not ordered. The "Source Object" for both of these forms are set to the same: [frmPurchaseOrderListSubform]

How do I achieve this?


ASKER CERTIFIED SOLUTION
Avatar of peter57r
peter57r
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of AbacusInfoTech
AbacusInfoTech

ASKER

In the onOpen of the main form I guess? I'll give it a go.
I should add that as far as I know you have to do the recordsource settings via code.  I don't believe there is any way to do it via the UI.
Yep, exactly what I needed. Thanks...