Submit Buttons in FORMS

Results 1 to 4 of 4

Thread: Submit Buttons in FORMS

  1. #1
    rrt Guest

    Default Submit Buttons in FORMS

    I want to create a "First", "Previous", "Next", "Last" button in my form. For that I have 4 submit buttons in the same form which is coming back to my existing page. Also I have a hidden box.<BR><BR>This code is in myform.asp :<BR><BR>If Request.Form ("Check") = "True" Then<BR> <BR> If Request.Form ("Submit") = "Previous" Then<BR> rst.MovePrevious<BR> ElseIf Request.Form ("Submit") = "Next" Then<BR> rst.MoveNext<BR> ElseIf Request.Form ("Submit") = "First" Then<BR> rst.MoveFirst<BR> ElseIf Request.Form ("Submit") = "Last" Then<BR> rst.MoveLast<BR> End If<BR> <BR>Else<BR> rst.MoveFirst<BR>End If<BR><BR>Now my form is below this code which is:<BR><BR>&#060;FORM action="myform.asp" method="POST"&#062;<BR>..........<BR>..........<BR >&#060;input type="HIDDEN" name="Check" value="True&#062;<BR><BR>&#060;input type="submit" name="Submit" value="Previous"&#062;<BR><BR>&#060;input type="submit" name="Submit" value="Next"&#062;<BR><BR>&#060;input type="submit" name="Submit" value="First"&#062;<BR><BR>&#060;input type="submit" name="Submit" value="Last"&#062;<BR>&#060;/FORM&#062;<BR><BR>If I run this code, on opening this page; I see the first record. Also the "First" & "Last" buttons work. When I click the "Next" button first time, it goes to the 2nd record. However it stays in the second record if I click "Next" anymore. The "Previous" button gives me a error:<BR><BR>ADODB.Field error &#039;800a0bcd&#039; <BR><BR>Either BOF or EOF is True, or the current record has been deleted. Requested operation requires a current record<BR><BR>This is even when the displayed recordset is the 2nd one.<BR>Can anyone please help me figure out where my code is going wrong? Thank You

  2. #2
    Join Date
    Dec 1969

    Default You should be using paging


  3. #3
    rrt Guest

    Default RE: What is paging?

    I can&#039;t get what you&#039;re talking about. Can you please tell me what that is?

  4. #4
    Join Date
    Dec 1969
    Los Angeles, CA

    Default IF you could be bothered to search...

    ...for what it was you would have got the answer<BR><BR>read this<BR><BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts