'define a datarow object to hold a record from Toppings table Dim row As PizzaDataSet.ToppingsRow 'go through all the rows in the table For Each row In Me.PizzaDataSet.Toppings.Rows Dim chk As New CheckBox chk.Name = "CheckBox" & row.ToppingID chk.Text = row.ToppingName chk.AutoSize = True If row.ToppingCategory = "Meat" Then Me.fpmeat.Controls.Add(chk) Else Me.fpveggie.Controls.Add(chk) End If AddHandler chk.CheckedChanged, AddressOf ToppingCheckChanged Next