Database structure: I have a large dataset, a query which filters those data records, and a form that displays the data (and also allows the user to adjust the query filter parameters).
I need to create an additional filter which simply selects a pre-determined subset of the records. I.e. a combo box where the user can select "Group A" or "Group B" or "All" etc.
The only way I can think of doing this is to create a separate table which lists each group (that's ok), then INNER JOIN the desired group table to the main dataset to filter those records only. But how do I let the user select which group list to join?
Is it possible to for a query to create a join based on a variable? E.g. MainTable INNER JOIN Iif(case A, "TableA", else case B, "TableB"...) etc.
Thanks!
I need to create an additional filter which simply selects a pre-determined subset of the records. I.e. a combo box where the user can select "Group A" or "Group B" or "All" etc.
The only way I can think of doing this is to create a separate table which lists each group (that's ok), then INNER JOIN the desired group table to the main dataset to filter those records only. But how do I let the user select which group list to join?
Is it possible to for a query to create a join based on a variable? E.g. MainTable INNER JOIN Iif(case A, "TableA", else case B, "TableB"...) etc.
Thanks!