Looping a dataset

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi,
How do I continue a loop if a null or blank value is found? This is part of
my code

For i = 0 To iRowCount

sStore = dsi.Tables(0).Rows(i)(0)

If sStore.Empty then goto next

ComboBox1.Items.Add(sStore)


Next


So if the value of sStore is Null, Empty or blank then move to the next line
and continue the loop. The dataset is populated from an excel file.

Thanks
 
For i = 0 To iRowCount
If Not IsDBNull(dsi.Tables(0).Rows(i)(0)) Then
sStore = dsi.Tables(0).Rows(i)(0)
ComboBox1.Items.Add(sStore)
End If
Next
 
Back
Top