Hi all,
I am an admitted novice in VBScript. I am trying to search a Data Access Page with a Find button that should be finding author names within a field on my DAP. I am getting an "error 3265 - Item cannot be found in the collection corresponding to the requested name or ordinal". I've been working on this for awhile without success and I suspect I'm missing something minor. Help!
thanks for any help anyone can provide. I'm pretty frustrated!
C Miller
I am an admitted novice in VBScript. I am trying to search a Data Access Page with a Find button that should be finding author names within a field on my DAP. I am getting an "error 3265 - Item cannot be found in the collection corresponding to the requested name or ordinal". I've been working on this for awhile without success and I suspect I'm missing something minor. Help!
Code:
<SCRIPT language=vbscript event=onclick for=Find>
<!--
Dim rs
Set rs = MSODSC.DataPages(0).Recordset.Clone
On error resume next
rs.find "[Authors] Like '*" & CStr(InputBox("Enter an author","Find"))& "*'"
If (err.number <> 0) then
Msgbox "Error: " & err.number & " " & err.Description,,"Invalid Search"
Exit Sub
End If
If (rs.bof) or (rs.eof) Then
Msgbox "No author found",,"Search Done"
Exit Sub
End If
MSODSC.DataPages(0).Recordset.Bookmark = rs.Bookmark
-->
</SCRIPT>
thanks for any help anyone can provide. I'm pretty frustrated!
C Miller