i need to retrive a value of a field but looping through a fields like Doc1, Doc2, doc3 and to the doc10. so i did:
for i = 1 to 10
DocValue = rs!doc & i.value
do whatever
next
I need to know if i am right or not?
Not quite right.
DocValue = rs("doc" & i.value)
rs!doc & i.value attempts to get the value of the "doc" field, then concatenate the value of the "i" control. In other words, the "!" operation occurs before the "&" operation. Rick Sprague
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.