Dim desinftb As New maindatabaseDataSet.MateriaisDataTable
desinftb = maindatabaseDataSet.Materiais
Dim count As Integer
count = desinftb.Rows.Count
Dim b As Integer
For b = 0 To count
Dim asc As String
asc = MaindatabaseDataSet.Materiais.Rows(b).Item(0)
matcombo.Items.Add(asc)
Next
Me.BackColor = Color.Blue
Dim desinfta As New maindatabaseDataSet.TratamentosDataTable
desinfta = MaindatabaseDataSet.Tratamentos
Dim a As Integer
Dim counttra As Integer
counttra = desinfta.Rows.Count
For a = 0 To counttra
Dim bsc As String
bsc = MaindatabaseDataSet.Tratamentos.Rows(b).Item(0)
combotrat.Items.Add(bsc)
Next
This code allows me to get data from a table in a database and populate a combobox with it when the form loads but after the second next any code i write
the application doesn't read, like the code to puplate the second combobox. If anyone knows what the problem is, please hellp me.


