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

Find method in the ADO recordset

Status
Not open for further replies.

dbrooks74

Programmer
Nov 13, 2001
105
US
I can't seem to get this to work, can anyone help?

'dePayroll.rscmdEmployee.Find "empLastName = 'ROY'", , adSearchForward, adBookmarkFirst
dePayroll.rscmdEmployee.Find "empLastName = '" & txtEmpLastName & "'", , adSearchForward, adBookmarkFirst

The first line works fine but when I try to use the second line and put "ROY" in the txtEmpLastName text box it doesn't do anything, any ideas? Thanks.
 
Try this

adSearchForward, adBookmarkFirst
dePayroll.rscmdEmployee.MoveFirst
dePayroll.rscmdEmployee.Find "empLastName = '" & txtEmpLastName & "'", , adSearchForward, adBookmarkFirst
Anything is possible, the problem is I only have one lifetime.
[cheers]
 
I tried that, however that didn't change anything since I was already on the first record in my recordset. -db
 
Is this the exact line?

dePayroll.rscmdEmployee.Find "empLastName = '" & txtEmpLastName & "'", , adSearchForward, adBookmarkFirst

If it is try this
dePayroll.rscmdEmployee.Find "empLastName = '" & txtEmpLastName.text & "'", , adSearchForward, adBookmarkFirst

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top