Hi Peter,
If you are trying to access the checkboxes on a form, you can interate through all the controls and determine which ones are checkboxes. Here is some sample code:
foreach(Control oObj in this.Controls)
{
if (oObj is CheckBox){
((CheckBox)oObj).Checked = <do something here> ;
}
}
>Hi,
>
>I've inherited a database for a mailing list with lots of check boxes which I'm converting to VB.NET. Is there an elegant way to reference upwards of 25 check boxes in a class other than to have a property for each one? I'd quite like the users to be able to add their own columns at a later date! I'd thought of using a string with one letter for yes and a different one for no but I imagine that could get quite messy!
>
>Thanks
-----------------------------------------
Cathi Gero, CPA
Prenia Software & Consulting Services
Microsoft C# / .NET MVP
Mere Mortals for .NET MVP
cgero@prenia.comwww.prenia.comWeblog: blogs.prenia.com/cathi