ADO Recordset Seek or Find 
Author Message
 ADO Recordset Seek or Find

Please help!  I'm using Jet 4.0, Access 2000  and  I'm opening an ado
recordset with the following code:

Public Function OpenMtrClass(ByVal strSQL)
    Set adoRSMtrClass = New ADODB.Recordset
    adoRSMtrClass.Open strSQL, adoConnection, adOpenDynamic,
adLockPessimistic
    OpenMtrClass = True
End Function

I call this  function passing a table name within my database rather than an
SQL statement.  The table is opened and read thru all recs to load a combo
box.  This works fine.  Then at runtime, after the key to the database is
selected in the first combobox, I want to position myself at the correct
record in the table.  However, neither the seek or the find methods work.
I've found that .seek is not supported but I don't know why - can't I use
Access indices?  And when I change to .find I get an error that says the
recordset can't scroll backwards.  Here's the find code:

       With adoRSMtrType
             .MoveFirst
            .Find ("mtrtype = 'SRII'")
            If .EOF Then
                blnNew = True
            End If
        End With

Any suggestions?
Sue



Fri, 29 Nov 2002 03:00:00 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. Need help with FIND and SEEK Recordset from Access Database

2. Seek method not found for my ADODB.Recordset object

3. ADO Finding Highest Number in ADO Recordset field?

4. Seek method on ADO data recordset?

5. Seek, Index on ADO Recordset

6. ADO Recordset Object, Seek Method

7. Seek trough ADO Recordset...

8. ADO Recordset Object, Seek Method

9. ADO Recordset Object, Seek Method

10. Find, Search, Seek with ADO

11. Need ADO code example for Seek or Find

12. ADO Find vs. DAO Seek

 

 
Powered by phpBB® Forum Software