Take Away: This code snippet shows you how to loop through a form's fields.
KB100422
The following code loops through the fields in a form:
Dim TableField
For FormField = 1 to AForm.count() If Left(FormField, 1) = "x" Then Response.Write FormField & " = " & AForm(FormField) Response.Write AForm.Key(FormField) & "=" & AForm.Item(FormField) End If Next
The following code also works, but the order of fields is sometimes not predictable:
For Each FormField in AForm If Left(FormField, 1) = "x" Then Response.Write FormField & " = " & AForm(FormField) Response.Write AForm.Key(FormField) & "=" & AForm.Item(FormField) End If Next