به نمونه كد زير نگاه كن . دو روش استفاده كردم .
يكي از ليست باكس . يكي ديگه از SQL به كمك كنترل Data Grid :
Private Sub cmdSearch_Click()
Dim FieldValue, FieldName, Criteria As String
lstSearch.Clear
FieldName = Combo1.Text
FieldValue = TxtBookName.Text
If FieldValue <> "" Then
FieldValue = TxtBookName.Text
Criteria = FieldName & " =" & "'" & FieldValue & "'"
Data1.Recordset.FindFirst Criteria
If Data1.Recordset.NoMatch = True Then
lstSearch.AddItem "Field Not Found"
End If
Do While Data1.Recordset.NoMatch = False
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum