My code starts in a loop, creates textboxes, the number of them dependant on available rows from an SQL query.

How can I read them?
The below code just errors out. Formdate[i] might be 0 to 6.
<code>
DateData = document.form2. + "D" + formdate[i] + .value ;
</code>