I'm not sure how to best explain this, but I'll give it a shot. I have an edit form that among other fields, will show eight <input type="file"..> fields. I want to loop through my query and if an image already exists that corresponds to one of these file fields, I want to display the image next to it. Then for those that do not have an image associated with them, just display the input field by itself. So no matter what, there are always eight fields displayed. How do I make this loop continue until it outputs eight tolal times, even if the query returns less than eight records. I'm not sure how to handle this kind of loop. Here's what I have, but it only shows fields that do have an image associated with them.
Code:
<% Dim i
Dim finalE
i = 1
finalE = 8
For i = 1 to finalE
strImgName = qProd("img_name")
If strImgName <> "" Then
%>
<br>
Photo <%= i %>:
<input type="file" size="50" name="File<%= i %>" /><img src='<%= strImgName %>' border="2" style="border-color:#CCCCCC">
<%
Else
%>
<br>
Photo <%= i %>:
<input type="file" size="50" name="File<%= i %>" />
<%
End If
i = i + 1
qProd.movenext
Next
%>