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

ADO FIND command

Status
Not open for further replies.

h2oski

Programmer
Nov 15, 2001
8
0
0
US
Hi,

I was wondering if someone could give me an example of howto use the FIND command.

Thanks in advance,

Bill
 
here you go, hope it helps ya!

recordset.Find (criteria, skipRows, searchDirection, start)

Jeremy-
 

Hi Jeremy,

Thanks for the info....

that is the standard code that you get from WROX books. Actually I have read link9's FAQ, The 3 most important recordset properties faq333-618
I am just not sure how to put it all together.

I am attempting to create a menu system that will have at least the following five buttons.
FIRST PREVIOUS NEXT LAST Search by Record Number



 
well here is quick example:
<%
var x = rs(&quot;Myfield&quot;)
rs.MoveFirst
rs.Find &quot;Myfield = 'something' &quot;
If (objRecordset.BOF = True) OR (objRecordset.EOF = True) Then
MsgBox &quot;Record not found&quot;
End If
%>
here is a real simple example. I search for the a record starting at the first one, (1 is the defualt starting position), until the field &quot;Myfield&quot; is equal to 'something'. If it is not found i pop up a box saying so. Very simple and easy. Also note that this is really no faster than just performing a &quot;Select&quot; statement for your criteria every time, the algorithm is exactly the same.
Good luck

Jeremy
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top