2 replies
by joebattig Accepted solution
by tony hopkinson Accepted solution
But you need to a query that
does this
Select MyCoumn1,count() From MyTable MyColumn1 = ? Group By MyColumn1
? would be the value in the combo.
You'll need one of these for each combo (fired by OnChange probably)
In Fact drop the left column and show number of entries next to the combo.
If you want one one report for all the combos
you could use a query like this
Select MyCoumn1 as Value,count() as NumberOfEntries From MyTable MyColumn1 = ? Group By MyColumn1
UNION
Select MyCoumn2,count() From MyTable MyColumn1 = ? Group By MyColumn2
If say it was forname and surname and town, I'd consider inserting a third column, because in theory the same value could be in all three columns but mean diffent things
Select cast('Forename',VarChar(16) as Type,MyCoumn1 as Value,count() as NumberOfEntries From MyTable MyColumn1 = ? Group By MyColumn1
UNION
Select 'Surname',MyCoumn2,count() From MyTable MyColumn1 = ? Group By MyColumn2
Hopefully there's some helpful ideas somewhere in there.
This discussion is closed to new replies.
Trending Software posts
Sort by Trending