top clients

  • Thread starter Thread starter JohnE
  • Start date Start date
J

JohnE

The report is one to display the top 'n' clients. I have
a form (FormA) that has on it an unbound textbox
(txtTopClients) for the user to put a number in and the
report will show the clients. I designed a query to show
the top 10 based on the knowledge base article. But, I
would like to have the user place a number in the txt box
and the report show accordingly. I am stumped at how to
get it to work.
Any thoughts are accepted.
*** John
 
JohnE said:
The report is one to display the top 'n' clients. I have
a form (FormA) that has on it an unbound textbox
(txtTopClients) for the user to put a number in and the
report will show the clients. I designed a query to show
the top 10 based on the knowledge base article. But, I
would like to have the user place a number in the txt box
and the report show accordingly.


You'll have to set the report's RecordSource property in its
own Open event. Get rid of the TOP 10 in your existing
query and then use code along these lines:

Me.RecordSource = "SELECT TOP " & _
Forms!theform.thetextbox & _
" * FROM yourexistingquery"

Make sure that the form remains open (can be invisible)
while the report is running.
 
Back
Top