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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Moving forward and backwards a record at a time

Status
Not open for further replies.

AssetRecovery

Programmer
Sep 17, 2003
14
US
I have a form that posts to an asp page for entering new records into an Access 2002 database. I also have another page that will be used for updating records. I have a field in the db that is the primary key as well as an autonumber called reponum. When I open the recordset I know I am able to grab this value but I do not know the syntax to make it so I can have a "Next Record" button and a "Previous Record" button. I'm guessing I can use the form to post the value of this field from the database to the url as a string and then do a request.querystring() but like I said I need a working example of how to do this. As an another feature if it's not to much work it would also be nice to have a first and last record button as well.
 
I have a few examples of how to do record paging. This is different. I don't want to have a link that I click on that posts the recordid to the url. I want to have a form button that posts the next recordid to the page and my sql pulls back that record in the where clause. What I don't know how to do get the next record id. Say I'm on record 23 I need the syntax to get record 24 so it needs to get the current id number and then add one to it or subtract 1 depending on whether I am moving forward or pagewards. Sounds simple enough I just don't know the syntax.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top