10-25-2004, 11:16 AM
Hi! I'm trying to search the database using a name field, but having troulbe doing so. I have a textbox where the user can type in the name that they want to search, and then click on a command button cmdSearch, from there, it would display the name that matches in the database in a text box provided. Please advice me on that. Any example code would help. Thanks
10-25-2004, 12:23 PM
>Any example code would help.
What about showing what you have so far?
10-25-2004, 12:40 PM
This is what I have so far but the problem is it displays on a listbox, I like for it to display in a textbox.
Private Sub cmdSearch_Click()
Dim sql As String, rs As ADODB.Recordset
Set rs = New ADODB.Recordset
sql = "Select * from info where name='Example'"
rs.Open sql, db.ConnectionString
If rs.RecordCount < 0 Then
Do Until rs.EOF
Set rs = Nothing