Results 1 to 3 of 3

Thread: what is wrong ?? no findfirst only find !!!!

  1. #1

    Thread Starter
    Lively Member Edilson's Avatar
    Join Date
    Aug 2000
    Location
    Orlando
    Posts
    81
    Dim WithEvents adoBedRS As Recordset
    Private Sub Form_Load()
    Dim SQL As String
    Set adoBedRS = New Recordset
    adoBedRS.Open "select BEDname,BEDSIZE from BED", Conn1, dbOpenDynaset, adLockOptimistic

    adoBedRS.findfirst "bed=1" ' this won't work why ??

    End Sub

  2. #2

    Thread Starter
    Lively Member Edilson's Avatar
    Join Date
    Aug 2000
    Location
    Orlando
    Posts
    81
    how do i do to move the cursor to the record i've just found ??

  3. #3
    Hyperactive Member
    Join Date
    Nov 1999
    Location
    Columbia, SC USA
    Posts
    374
    You are using ADO, and ADO does not have a .FindFirst
    method. To find the first record that matches the criteria,
    move to the first record and then execute the .Find method,
    like this:
    Code:
    adoBedRS.MoveFirst 
    adoBedRS.Find "bed = 1"
    If adoBedRS.EOF Then
        MsgBox "Record Not Found"
    Else
        MsgBox "Record Found"
    End If
    For your second question, when you find a record, the cursor
    is already pointing to it.


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width