recordset.find

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • soran
    New Member
    • Sep 2006
    • 1

    recordset.find

    Can any 1 tell me how should I use this function?
  • mra
    New Member
    • Sep 2006
    • 15

    #2
    Originally posted by soran
    Can any 1 tell me how should I use this function?

    Hi,
    it is a simplle work, Please try this and refer the vb msdn Help

    Dim ObjCon As New ADODB.Connectio n
    Dim Rst As New ADODB.Recordset
    Dim mark As Variant
    Dim count As Integer

    count = 0
    ObjCnn.Open "Driver=Microso ft Access Driver (*.mdb);dbq=" & App.Path &"\Library.m db"
    Rst.Open "SELECT title_id FROM titles", ObjCnn, _
    adOpenStatic, adLockReadOnly


    Rst.Find "title_id LIKE 'B*'"

    Do While Rst.EOF <> True
    Debug.Print "Title ID: "; Rst.title_id
    count = count + 1
    mark = Rst.Bookmark
    Rst.Find "title_id LIKE 'B*'", 1, adSearchForward , mark
    Loop

    Rst.Close

    Comment

    Working...