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

FInd Seek

Status
Not open for further replies.

giggs11

Programmer
Dec 5, 2001
21
CA
I know that for Data control you can use the Index and Seek function to search for records, but what do i use for the Ado control? Also, how do i set conditons? eg. User cannot go on to the next field without entering something in the previous field.


Simon
 
Hi,
with an adocontrol you can use the Find method
Say you have following controls on you form
ADO1 'AdoControl
Text1 'Textbox where the data is you have to look up

With ADO1.Recordset
.MoveFirst
.Find "myField='" & Text1 &"'"
If .EOF Then
MsgBox txtPostkode & " not Found."
Else
'Put your code here
End If
End With

Hope this helps
Good luck
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top