30-10-18, 12:53 AM
(آخر تعديل لهذه المشاركة : 30-10-18, 10:12 AM {2} بواسطة asemshahen5.)
ضع هذا في مديول :
و هذا في حدث تغير التكست بتاع الرقم :
كود :
Public Sub ChekSupplier(TxtSupplier As String,ID As String)
Dim StrSQL As String = "Select * From Invoices Where TheSupplier = '" & TxtSupplier & "' And ID=" & ID
Dim cn As New OleDb.OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0; Data Source=db.mdb;User Id=admin;Password=;")
Dim da As New OleDb.OleDbDataAdapter(StrSQL, cn)
Dim dt As New DataTable
da.Fill(dt)
If dt.Rows.Count > 0 Then
MsgBox("الفاتورة موجودة مسبقا باسم : " & dt.Rows(0)("TheSupplier").ToString)
End If
End Subكود :
ChekSupplier(TxtSupplier.Text,TxtID.Text)سبحان الله وبحمده سبحان الله العظيم و الحمد لله ولا اله الا الله والله اكبر
