Private Sub txtSerch_TextChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles txtSerch.TextChanged
If cnn.State = ConnectionState.Open Then
cnn.Close()
End If
'On Error Resume Next
Dim Ask As String
cnn.Open()
AchatsBS.Filter = "N + Société + Dates + Montant like '%" + txtSerch.Text + "%'"
If DataGridView1.RowCount = 0 Then
Ask = MsgBox("Ce Fournisseur N'existe Pas, Voulez vous ajouter un?", MsgBoxStyle.YesNo)
If Ask = MsgBoxResult.Yes Then
txtSerch.Text = ""
frmsaisiedesfour.Show()
End If
End If
cnn.Close()
End Sub
لكود يشتغل لكن ليس عن طريق رقم الفاتورة إذ لو كتبت رقم الفاتورة في الـ txtSerch لا يعمل أما الباقي Société + Dates + Montant فيشتغل جيدا أود أن اعرف لماذا ممكن ؟![]()