B
Brian Scheele
Suppose I have 5 fields on a form, f1, f2, f3, f4, and f5, and I want to pull
values in the field, x, in the recordset, rst.
My code is like this (pseudocode):
rst.movefirst
f1 = x
rst.movenext
f2 = x
rst.movenext
f3 = x
rst.movenext
f4 = x
rst.movenext
f5 = x
I would rather code it like this:
i=1
dim F as field
rst.movefirst
while not rst.EOF
field = "f" & i
field = x
i = i + 1
rst.movenext
wend
The field = x would make f1 = x on the first pass, then f2 = x on the
second, etc.
--
Brian Scheele
IT Manager
Clark Filter
3649 Hempland Road
Lancaster, PA 17601-1323
values in the field, x, in the recordset, rst.
My code is like this (pseudocode):
rst.movefirst
f1 = x
rst.movenext
f2 = x
rst.movenext
f3 = x
rst.movenext
f4 = x
rst.movenext
f5 = x
I would rather code it like this:
i=1
dim F as field
rst.movefirst
while not rst.EOF
field = "f" & i
field = x
i = i + 1
rst.movenext
wend
The field = x would make f1 = x on the first pass, then f2 = x on the
second, etc.
--
Brian Scheele
IT Manager
Clark Filter
3649 Hempland Road
Lancaster, PA 17601-1323