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

DAP search error in VBScript

Status
Not open for further replies.

camiller

IS-IT--Management
Jan 20, 2002
8
AU
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!

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
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top