Hi,
I'm new to data access pages and struggling with a Find button on my page. I want to allow the use to search a text field called Authors. I am not too good at VBScript, so this may be an obvious problem to those more seasoned. When I run the script below, I get a "error 13 type mismatch" error. Any thoughts from anyone. Any help is appreciated.
C Miller
I'm new to data access pages and struggling with a Find button on my page. I want to allow the use to search a text field called Authors. I am not too good at VBScript, so this may be an obvious problem to those more seasoned. When I run the script below, I get a "error 13 type mismatch" error. Any thoughts from anyone. Any help is appreciated.
Code:
<SCRIPT language=vbscript event=onclick for=Find>
<!--
Dim rs
Set rs = MSODSC.DataPages(0).Recordset.Clone
On error resume next
rs.find "[Authors]=" & cLng(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>
C Miller