E
Eric
Hi, I have created a search button for a data access
page. For some reason, when I click the button, nothing
happens. Can someone take a look at my code and tell me
where the problem is? Thanks in advance.
<SCRIPT language=vbscript event=onclick(Search)
for=btnCommand0>
<!--
Dim rs
Set rs = MSODSC.DataPages(0).Recordset.Clone
On error resume next
rs.find "Search Keyword = '" & *(InputBox("What Would You
Like To Search For?", "Search")) & "'"
'Custom Error Handling
If (err.number <> 0) Then
MsgBox "Nothing Matches" & err.number & " " &
err.description,,"Invalid Search"
Exit Sub
End If
'Check search results for success.
If (rs.bof) or (rs.eof) Then
MsgBox "No Matching Records Were Found",,"Search
Done"
Exit Sub
End If
MSODSC.DataPages(0).RecordSet.Bookmark = rs.Bookmark
-->
page. For some reason, when I click the button, nothing
happens. Can someone take a look at my code and tell me
where the problem is? Thanks in advance.
<SCRIPT language=vbscript event=onclick(Search)
for=btnCommand0>
<!--
Dim rs
Set rs = MSODSC.DataPages(0).Recordset.Clone
On error resume next
rs.find "Search Keyword = '" & *(InputBox("What Would You
Like To Search For?", "Search")) & "'"
'Custom Error Handling
If (err.number <> 0) Then
MsgBox "Nothing Matches" & err.number & " " &
err.description,,"Invalid Search"
Exit Sub
End If
'Check search results for success.
If (rs.bof) or (rs.eof) Then
MsgBox "No Matching Records Were Found",,"Search
Done"
Exit Sub
End If
MSODSC.DataPages(0).RecordSet.Bookmark = rs.Bookmark
-->