Results 1 to 2 of 2
  1. #1
    New Lounger
    Join Date
    Sep 2005
    Posts
    16
    Thanks
    0
    Thanked 0 Times in 0 Posts

    ADO question (2002 adp)

    ivr not been using ado long so im still learning, i wondered if there was anyone really good at it who could tell me whether this is acceptable ado code.
    Also i would like to put in there something like the DAO nomatch method but i dont know how to do it in ado.
    any help?



    Private Sub CmbName_AfterUpdate()
    On Error GoTo Err_CmbName
    Dim rst As ADODB.Recordset
    Set rst = Me.Recordset.clone


    If Not Nz(CmbName) = "" Then
    rst.Find "SLMN = " & CmbName
    Me.Bookmark = rst.Bookmark
    End If

    Exit_CmbName:
    Exit Sub

    Err_CmbName:
    MsgBox Err.Description
    Resume Exit_CmbName

    End Sub

  2. #2
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: ADO question (2002 adp)

    With ADO recordsets, you check for Not BOF and Not EOF. There is no NoMatch method in ADO. If you hit the EOFor the BOF, you haven't found a match.
    Charlotte

Posting Permissions

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