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

Find method not working - Access 2000 ADO

Status
Not open for further replies.

chansen

Programmer
May 29, 2001
10
0
0
CA
I'm trying to do a simple find method in an ADO recordset, and can't get it to work for the life of me.

The Access help file shows a Find Method for specific text in modules and class modules, but not the ADO Find Method?

The following code generates, "Run-time error '3001' - Args. are of wrong type, out of acceptable range, or in conflict with one another"

Dim intCatSortA As Integer
Dim rs As New ADODB.Recordset
rs.Open "SELECT * FROM tblEstCategories " & _
"ORDER BY CatSort", CurrentProject.Connection, _
adOpenKeyset, adLockOptimistic
intCatSortA = Me!lstCategories.Column(2, Me!lstCategories.ItemsSelected)
If intCatSortA <> 0 Then
rs.Find &quot;CatSort = intCatSortA&quot; <- hangs here
etc.

What is going wrong with the help system and my code?

Somebody?

Anybody?

Thanks,
Craig
 
Hi,

Since 'intCatSortA' is a variable you don't want the word 'intCatSortA' as your criteria but its integer value.

Try this:

rs.Find &quot;[CatSort] = &quot; & intCatSortA

 
I could kiss you.

Now, why does &quot;Help&quot; not display help for this method, or many other ADO and DAO methods?

Craig
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top