Dim drNewRow As DataRow = m_CustomerDataTable.NewRow()
drNewRow("CustID") = m_Customercount
drNewRow("Company") = txtCompName.Text.Trim
drNewRow("Address") = txtAddress.Text.Trim
drNewRow("Telephone") = txtContact.Text.Trim
drNewRow("Address") = txtAddress.Text.Trim
drNewRow("Email") = btnEmail.Text.Trim
Dim counter AsInteger = 0
While counter < m_CustomerDataTable.Rows.Count
If m_CustomerDataTable.Rows(counter)("Company") = txtCompName.Text.TrimThen
MessageBox.Show("This company already exists")
ExitSub
EndIf
counter = counter + 1
EndWhile
m_CustomerDataTable.Rows.Add(drNewRow)
m_CustomerDataAdapter.Update(m_CustomerDataTable)
'end of add
'adding a colourcombination
m_Colourcount = m_Colourcount + 1
Dim drNewRow1 As DataRow = m_ColourDataTable.NewRow()
drNewRow1("CID") = m_Colourcount
drNewRow1("CustID") = m_Customercount
drNewRow1("ColourName") = g_colourname
m_ColourDataTable.Rows.Add(drNewRow1)
m_ColourDataAdapter.Update(m_ColourDataTable)
'end of add
cboColourName.Enabled = True
cboColourCode.Enabled = True
lstColourName.Items.Add(g_colourname)
lstColourName.SelectedItem = g_colourname
txtCompName.Enabled = False
txtAddress.Enabled = False
txtContact.Enabled = False
btnEmail.Enabled = False
btnNewCombination.Enabled = False
EndSub
this was working fine for quite a while
but after i made some changes to the other part of the programs which do not seem to be related to this in any way i get this error msg
Either the thread starter or a moderator has marked this thread as solved. You can most likely trust the responses and answers given. There is most likely no reason for any further responses to be posted here. If you have a related question, please start a new thread in this forum instead.
This thread is more than three months old
No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.