N
Nikki
I am trying to put a find button on a DAP but it is not working for me- My
Table is a list of people and their Phone numbers. I want to search the last
name field. The following code gives an error 3001 when i type in a last
name. Any help is greatly appreciated. If you don't help with DAP pages-Is
there a site that I can go to?
Thanks-
<SCRIPT language=vbscript event=onclick for=cmdfind>
'Clone the recordset.
Dim rs
Set rs=MSODSC.DataPages(0).Recordset.Clone
On error resume next
rs.find "[LastName]LIKE'*"& cstr(inputbox("Enter a Last Name","Find"))&"*'"
If(err.number <> 0) Then
Msgbox "Error:"&err.number&" "&err.description,,"Invalid Search"
Exit sub
End If
'Check search results for success.
If (rs.bof) or (rs.eof) Then
Msgbox "Name Not Found",,"Search done"
Exit Sub
End If
MSODSC.DataPages(0).Recordset.Bookmark=rs.Bookmark
Table is a list of people and their Phone numbers. I want to search the last
name field. The following code gives an error 3001 when i type in a last
name. Any help is greatly appreciated. If you don't help with DAP pages-Is
there a site that I can go to?
Thanks-
<SCRIPT language=vbscript event=onclick for=cmdfind>
'Clone the recordset.
Dim rs
Set rs=MSODSC.DataPages(0).Recordset.Clone
On error resume next
rs.find "[LastName]LIKE'*"& cstr(inputbox("Enter a Last Name","Find"))&"*'"
If(err.number <> 0) Then
Msgbox "Error:"&err.number&" "&err.description,,"Invalid Search"
Exit sub
End If
'Check search results for success.
If (rs.bof) or (rs.eof) Then
Msgbox "Name Not Found",,"Search done"
Exit Sub
End If
MSODSC.DataPages(0).Recordset.Bookmark=rs.Bookmark