hey guys, can you help me? im using a datagridview, and it is connected to ms access. every time i have an input same in the column where primary key is I already got an error. can you guys how to show a messagebox if the Customer Contact number is already in use? here is my code.
Dim amount As Integer
amount = Remaining_bo_es_TextBox.Text - txtOrder.Text
Remaining_bo_es_TextBox.Text = amount
Label5.Text = txtOrder.Text * PriceTextBox1.Text
Label1.Text = Product_NameLabel1.Text
Transactions.TblTransactionsTableAdapter.Insert(Me.txtCustName.Text, Me.txtCustNumber.Text, Me.txtCustEmAdd.Text, Me.Label1.Text, Me.Label5.Text, Today.Date.ToShortDateString)
Transactions.TableAdapterManager.UpdateAll(Transactions.DanlexTransactionsDataSet)
Me.Validate()
Me.TblProductInfoBindingSource.EndEdit()
Me.TableAdapterManager.UpdateAll(Me.Db1DataSet)
Me.TblProductInfoTableAdapter.Fill(Me.Db1DataSet.tblProductInfo)
Label4.Text = "click new transaction"