How do I get this working when I have a couple of hundred optionboxes?

Can anyone help??