Дополнительная информация: произошла ошибка при создании формы. Увидеть исключение.свойство innerexception для деталей. Ошибка заключается в следующем: ссылка на объект не установлена на экземпляр объекта.
Мне нужно решение моей проблемы :
Additional information: An error occurred creating the form. See Exception.InnerException for details. The error is: Object reference not set to an instance of an object.
Что я уже пробовал:
Private Sub DataGridView_Orders_manager_DoubleClick(sender As Object, e As EventArgs) Handles DataGridView_Orders_manager.DoubleClick If con.State = ConnectionState.Open Then con.Close() Try Dim cmd As New OleDbCommand("select * from Query_show where ID=@ID", con) cmd.Parameters.Add("@ID", OleDbType.VarChar).Value = DataGridView_Orders_manager.SelectedRows(0).Cells(0).Value.ToString con.Open() Dim dr As OleDbDataReader = cmd.ExecuteReader dr.Read() If dr.HasRows Then Form_Update_Order.TextBox_mobile.Text = dr(3) Form_Update_Order.TextBox_name.Text = dr(9) Form_Update_Order.ComboBox_warranty.SelectedItem = dr(10) Form_Update_Order.ComboBox_backup.SelectedItem = dr(11) Form_Update_Order.ComboBox_format.SelectedItem = dr(12) Form_Update_Order.TextBox_workshopdate.Text = dr(16) Form_Update_Order.ComboBox_JOBDONE.SelectedItem = dr(13) Form_Update_Order.TextBox_DONEBY.Text = dr(14) Form_Update_Order.TextBox_other.Text = dr(15) Form_Update_Order.TextBox_no.Text = dr(0) Form_Update_Order.TextBox_date.Text = dr(1) Form_Update_Order.TextBox_tech.Text = dr(2) Form_Update_Order.TextBox_totalamount.Text = dr(4) Form_Update_Order.TextBox_total_taxamount.Text = dr(7) Form_Update_Order.TextBox_totaltotal.Text = dr(8) Form_Update_Order.TextBox_paid.Text = dr(5) Form_Update_Order.TextBox_balance.Text = dr(6) 'Form_Update_Order.TextBox_tech2.Text = dr(17) 'Form_Update_Order.TextBox_datebalance.Text = dr(18) 'Form_Update_Order.TextBox_balance2.Text = dr(19) Form_Update_Order.Show() 'TextBox_address.Text = dr(2) 'Else ' TextBox_name.Clear() ' TextBox_address.Clear() ' TextBox_mobile.SelectAll() ' TextBox_mobile.Copy() ' MsgBox("Does Not Exist!") ' Form_Customers.Show() Else MsgBox("No Data!") End If dr.Close() con.Close() Catch ex As Exception MsgBox(ex.Message) End Try 'If con.State = ConnectionState.Open Then con.Close() End Sub