Hello All,
Using VFP 6.0, trying to iterate through some .dbf field names that have #'s at the end (ex: field1, field2). Is there any way to do this without having to list out each field individually?
My Code currently looks like this:
Right now, I do realize that it's just comparing the string equivalent of 'gdate#' rather than field name gdate# against another string (mLybMAX, mLybMIN). Is there a way to append a number at the end of a field name? I have 20 gdate# fields to process through and I'd rather not have to list them out if at all possible.
Thanks!
Using VFP 6.0, trying to iterate through some .dbf field names that have #'s at the end (ex: field1, field2). Is there any way to do this without having to list out each field individually?
My Code currently looks like this:
Code:
mlybi = 1
DO WHILE mlybi <= 10
IF (('gdate' + alltrim(str(mlybi))) < mLybMAX) and (('gdate' + alltrim(str(mlybi))) > mLybMIN)
mLybCnt = mLybCnt + 1
ENDIF
mlybi = mlybi + 1
ENDDO
Right now, I do realize that it's just comparing the string equivalent of 'gdate#' rather than field name gdate# against another string (mLybMAX, mLybMIN). Is there a way to append a number at the end of a field name? I have 20 gdate# fields to process through and I'd rather not have to list them out if at all possible.
Thanks!