There are many occasions where my Boss would want to print a top values report for different cases.
I have been googling for how to enter the TOP N eg TOP 100, or TOP 200 in a parameter query. Having to do it manually by opening the SQL view in MS-Access 2007 to change the value of N, would be inconvenient if the user does not know the way around the basics of SQL view.
I would like to find out if it is possible to design a parameter query that opens up a dialog for you to input the value of N would make it more user friendly.
A sample sql would clearly show the problem.
Expand|Select|Wrap|Line Numbers
- SELECT TOP 50 Sum(tbl_Inv.Amount) AS SumOfAmount, tbl_Inv.Month, tbl_Inv.Year
- FROM tbl_Inv
- GROUP BY tbl_Inv.Month, tbl_Inv.Year
- ORDER BY Sum(tbl_Inv.Amount) DESC;
Thanks.
BenGik