rahulpatel
Programmer
I need to pick out all the records from my database where the customer has their checkbox state as checked. I have this so far...
This code is for me to find out how many records it returns to make sure it's picking up the correct amount. I'll add more detailed code once I get it to work.
At the moment this only returns the current record. What can I add to make it loop through all the records?
Code:
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnHome.Click
Dim Counter As Integer = 0
Dim Number As Integer
While CheckBox1.CheckState = CheckState.Checked
If Number < 0 Then Exit While
Number = Number - 1
Counter = Counter + 1
End While
MsgBox("The loop ran " & Counter & " times.")
End Sub
This code is for me to find out how many records it returns to make sure it's picking up the correct amount. I'll add more detailed code once I get it to work.
At the moment this only returns the current record. What can I add to make it loop through all the records?