Results 1 to 2 of 2

Thread: SQL Search Statement

  1. #1
    Guest
    Here is the code i'm using, and were it is located. Can someone help me out and tell me why this does not search and display the record it found .

    Private Sub cmbCompName_Change()

    Dim strSQL As String

    'searches for the current record that is to be updated
    strSQL = "Select * From tblCompany " & _
    "Where cCompName Like '" & cmbCompName.Text & "'"
    DatComp.RecordSource = strSQL
    DatComp.Refresh

    End Sub

  2. #2
    Fanatic Member Bonker Gudd's Avatar
    Join Date
    Mar 2000
    Location
    Saturn
    Posts
    748

    Talking

    Hi,
    If the Combo is a drop down list, you'll have to use the Click event.

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