Results 1 to 2 of 2
  1. #1
    Join Date
    May 2004

    Unanswered: Data Access page problem

    i have a data access page that i made that will allow users to see every record that has been made by a certain program. I added a find function so they wouldn't have to scroll through all of the records to find the one that they wanted. It seems as if they have to "activate" the recordset in order to search. if you just open the page and do a search, it won't display the message saying no record found, it will just sit on the opening page and not display the searched record. However, if they click to go the next page and then go back to the first page and research, it works like a charm. i just wonder if i'm missing something that would cause this to happen. Thanks, here is the section of code i'm referring to:

    <SCRIPT language=vbscript event=onclick for=cmdFind>
    ' Clone the recordset.

    Dim rs
    Set rs = MSODSC.DataPages(0).Recordset.Clone
    ' dim Str as string

    On error resume next
    ' This line assumes that the value you are filtering on is an integer.
    ' If the search value is a string, use slightly different syntax.
    ' For example, "CustomerID = '" &amp; CStr(InputBox("Please enter _
    ' customer to find", "Find")) & "'"

    rs.find "Item#=" & cStr(inputbox("Enter an Item Number","Find"))

    ' Custom error handling.
    If (err.number <> 0) Then
    Msgbox "Error: " & err.number & " " & err.description,, _
    "Invalid Search"
    Exit Sub
    End If

    ' Check search results for success.
    If (rs.eof) Then
    Msgbox "No Product found",,"Search Done"
    MSODSC.DataPages(0).Recordset.Bookmark = rs.Bookmark
    Exit Sub
    End If

    MSODSC.DataPages(0).Recordset.Bookmark = rs.Bookmark

  2. #2
    Join Date
    May 2004
    the actual problem seems to be the size of the recordset possibly, i can access the 506th record from the beginning but when trying to access the 507th record, it won't move. it just sits on the first page. does anyone know anything about a recordset size? i tried to clone the entire thing but apparently that didn't work. Thanks

Posting Permissions

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