|
-
Feb 15th, 2000, 05:05 PM
#1
Thread Starter
Junior Member
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!
-
Feb 18th, 2000, 05:03 AM
#2
New Member
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|