Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Looping through results with "Next" button

Participant ,
Jan 06, 2009 Jan 06, 2009
I have coding that loops through the results of a query with "Next" and "Previous" links. It takes you to the next result but keeps you on the same page. Is there a way to do almost the same thing but with only a "Next" link? Then when you reach the last result clicking "Next" again will jump back to the first result? So if you had 3 results you would continuously hit next and just loop them over and over. Attached is the coding I am using now.
285
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Jan 08, 2009 Jan 08, 2009
Looks like you'd just need to add one final IF statment that checks to see if you've browsed to the last subset of records. Since you're browsing in sets of 10 you'd need to do a check to see if your startrow plus 10 is GTE the recordcount; if so that means you're viewing the 'last' set of records in the group, and need to adjust the "View Next" link so that it starts over at the first row now.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Jan 09, 2009 Jan 09, 2009
LATEST
Thanks! I knew it had to be easy, my brain is just fried from this project.
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources