Results 1 to 2 of 2

Thread: Problems with the DBGrid

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Jan 2000
    Location
    south africa
    Posts
    16

    Post

    Hi!

    I have a search text box where I want the user to type in something, and when the record is retrieved it is displayed in the dbgrid.

    please help me!

  2. #2
    New Member
    Join Date
    Feb 2000
    Posts
    5

    Post

    The quickest way is with the data control and the DBGrid.

    Private Sub cmdFind_Click()
    Dim sql As String
    sql = "Select * From TableName Where TableNo Like'*" & txtFind.Text & "*'"
    Data1.DatabaseName = (App.Path & "\dbname.mdb")

    If txtFind = "" Then
    Data1.RecordSource = "Select * From TableName"

    Else
    Data1.RecordSource = sql
    End If
    Data1.Refresh
    End Sub


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