Null or not an object error

The following code

for (var x = 0; x < document.forms[0].Hazards.length; x++)

{

	if(document.forms[0].Hazards[x].checked) 

	document.forms[0].BLAH.value = document.forms[0].Hazards[x].value;

}

gives me a null or not an object error… can someone help me out? Thanks all.

Subject: null or not an object error

I just ran into this today because I forgot to check the Form property to “Generate HTML for all fields”…

Subject: RE: null or not an object error

I tried that, but im still getting that error