I need to pull the "TOP n" of a table, based on simple criteria (like Top 3 Salarys of employees, where Department = X). I know I can set "n" easily in design-mode, but this I need to run by form by a user who won't know Access. The "n" will always change (Top 5, Top 11, Top 2, etc.)
I can easily collect that number in a form.
But can I run a query from code or macro, telling it what "n" is?
I did try to set "Top Values" to "Forms!Form1!Text1", but the query will only accept a number or an acceptable constant.
Can anybody help? Thanks in advance!
I can easily collect that number in a form.
But can I run a query from code or macro, telling it what "n" is?
I did try to set "Top Values" to "Forms!Form1!Text1", but the query will only accept a number or an acceptable constant.
Can anybody help? Thanks in advance!