|
Hi I have an assignment due on Tusday and I'm against the clock. I've read everything in my text book relating to this problem, I've looked online, MSNDNAA etc and have ended up here. I've been trying to count checkboxes that are visible and returning the integer count to a label and not having any real luck. Dim chkChick As CheckBox Dim intAdd As Integer = 0
For Each chkChick in gpbChookNames.Controls If chkChick.Visible = True Then intAdd = intAdd + 1 lblCurrentChickens.Text = CStr(intAdd) End If Next
At first it returns the correct amount of visible items, however if I use my delete button which sets the checked CheckBox visible value to false and try the button click event handler that holds the code above again, it returns a much lesser value. For instance I have twelve check boxes visible. I click ACCEPT(top code). I get the number 11. I check a box and hit delete. I have 10 checkboxes visible. I hit ACCEPT again, however my tally is now 9. I don't understand why that'd be happening. Anyone got a clue why?
Thanks in advance Cheree
This post has been edited by cheree71: 10 May, 2008 - 11:40 PM
|