Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Need query to rotate names

Status
Not open for further replies.

needadvice

Programmer
Apr 7, 2002
145
US
I have a table of 150 names. I want to run a report based on a query that picks the next ten names on the list each time the query is run. Once I acheive this I want to choose the actual number of names. (it won't always be ten but must always be the next in line)
I need ideas on how to do this.
Thanks
 
If you have some button you click on a form to run the report, you could change your query to "Top 10", then save the value from the last record into a hidden text field. You would either need to open the query in your for to get the value, or add code in the report to save the value into the form.

SELECT TOP 10 MyTable.SomeName
FROM MyTable
WHERE (((MyTable.SomeName)>[Forms]![Form1]![txtLastName]))
ORDER BY MyTable.SomeName;


"Have a great day today and a better day tomorrow!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top