Results 1 to 2 of 2

Thread: beginner w/ FindFirst

  1. #1

    Thread Starter
    New Member
    Join Date
    Apr 2001
    Location
    Cleveland
    Posts
    1

    Question beginner w/ FindFirst

    What do I have to do to get the following code to work?



    'Calls up input box to find the desired record
    Private Sub cmdFind_Click()
    mstrClientLastName = InputBox("Enter the Last Name", "Find")
    If mstrClientLastName <> "" Then
    mrstClientLastName.FindFirst "fldClientLastName = " & "'" & _
    mstrClientLastName & "'"
    If mrstClientLastName.NoMatch = True Then
    MsgBox "Cannot find " & mstrClientLastName, vbInformation, "Atlantic Marketing"
    End If
    End If
    End Sub

  2. #2
    Hyperactive Member
    Join Date
    Jun 2000
    Location
    Gig Harbor, WA; Posts: 89950
    Posts
    360

    Lightbulb

    Ok here is one problem:

    'Calls up input box to find the desired record
    Private Sub cmdFind_Click()
    mstrClientLastName = InputBox("Enter the Last Name", "Find")
    If mstrClientLastName <> "" Then

    'Lets look at the name of this string a little closer:

    mrstClientLastName.FindFirst "fldClientLastName = " & "'" & _

    'Look above here it should be mstrClientLastName
    'Set your option explicit

    mstrClientLastName & "'"
    If mrstClientLastName.NoMatch = True Then
    MsgBox "Cannot find " & mstrClientLastName, vbInformation, "Atlantic Marketing"
    End If
    End If
    End Sub
    Mahalo
    VB6(SP5), VC++, COBOL, Basic, JAVA
    MBA, MCSD, MCSE, A+
    Computer Forensics

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