Hi there,
I just registered and see that u have solve many problems for many ppl .. and I get good and new info and codes from u..
I'm having problem with Datagrid bcoz for really I'm not advanced devoloper,I'm using DAO to show me the records from database to the List,,which is not reconized for my project,,Now ,, I need to use Datagrid on my search form to show my search result.. so plz help me fast,, attachment is a Screenshot for my Search form..
this is the code and it is working on List,but i need code for datagrid:
Private Sub cmdFind_Click()
If txtFind.Text = "" Then
MsgBox "Enter text to search for", vbOKOnly, "Error"
Else
If cmbFind.Text = "User Name" Then
Set rec = data.OpenRecordset("select * from PC where PC.UserName Like '*" & txtFind.Text & "*'")
With rec
lstFind.Clear
Do Until .EOF
lstFind.AddItem ("User Name: " & .Fields(0) & " Owner: " & .Fields(1) & " User Type: " & .Fields(2))
.MoveNext
Loop
End With
ElseIf cmbFind.Text = "PC Serial Number" Then
Set rec = data.OpenRecordset("select * from PC where PC.PCSerialNumber Like '*" & txtFind.Text & "*'")
With rec
lstFind.Clear
Do Until .EOF
lstFind.AddItem ("User Name: " & .Fields(0) & " Owner: " & .Fields(1) & " User Type: " & .Fields(2))
.MoveNext
Loop
End With
End if
End Sub