الكود التالي يقوم بالاستعلام عن سجل وحيد ويقوم بجلب البيانات ووضع القيم في داتاجريدفيو ولا توجد مشكلة
الكود في حدث
Private Sub DataGridView1_CellEndEdit(sender As Object, e As DataGridViewCellEventArgs) Handles DataGridView1.CellEndEdit
TextBox4.Text = DataGridView1.CurrentCell.Value.ToString
Command_Sql.CommandText = "select * from [A_ACCOUNT] where
= '" & DataGridView1.CurrentCell.Value.ToString & "' and
= '" & MDIParent1.All_Account_Comp.ComboBox.SelectedValue & "' " 'and [Is_Main] = '" & TextBox10.Text & "'"
Command_Sql.Connection = Conn_SqL
If Conn_SqL.State = ConnectionState.Open Then Conn_SqL.Close()
Conn_SqL.Open()
Datareader_Sql4 = Command_Sql.ExecuteReader
If Datareader_Sql4.Read = True Then
TextBox5.Text = Datareader_Sql4.Item("AccName")
DataGridView1.CurrentRow.Cells(2).Value = Datareader_Sql4.Item("code_co").ToString 'TextBox5.Text
DataGridView1.CurrentRow.Cells(3).Value = TextBox1.Text
DataGridView1.CurrentRow.Cells(4).Value = TextBox2.Text
DataGridView1.CurrentRow.Cells(6).Value = Datareader_Sql4.Item("AccName").ToString
DataGridView1.CurrentRow.Cells(7).Value = Datareader_Sql4.Item("acclevel").ToString
DataGridView1.CurrentRow.Cells(8).Value = Datareader_Sql4.Item("accsub").ToString
DataGridView1.CurrentRow.Cells(9).Value = Datareader_Sql4.Item("income_list").ToString
DataGridView1.CurrentRow.Cells(13).Value = "لم يرحل"
DataGridView1.CurrentRow.Cells(14).Value = MDIParent1.All_F_Year.ComboBox.Text
DataGridView1.CurrentRow.Cells(15).Value = "0"
DataGridView1.CurrentRow.Cells(16).Value = "0"SendKeys.Send("{up}")
SendKeys.Send("{left}")
Else
End If
المشكلة أن من بين الأعمدة عمود الوصف وبعد احضار البيانات أنتقل إليه وإذا كتبت نص ونضغط انتر يعطي رسالة خطأ كما في المرفقات وإذا كتبت رقم يتابع بدون مشاكل
أرجوا المساعدة فقد حاولت كثيرا ولا أفهم سب المشكلة


