C
CJM
I'm using a dictionary to record some totals, however, my first attempt
failed and I wasnt sure why...
snippet from original code:
oTotalFilters.Item(rsNetStock.fields("PartNo")) =
oTotalFilters.Item(rsNetStock.fields("PartNo") ) + CInt(iNumFilters)
After going back to the start, I eventually realised that the dictionary
Item property didn't like 'rsNetStock.fields("PartNo")' as a parameter, so I
had to use something like the following:
sTest = rsNetStock.fields("PartNo")
oTotalFilters.Item(sTest) = oTotalFilters.Item(sTest) + CInt(iNumFilters)
Am I missing something here? Surely, my original code should have worked?
Is this a known bug/feature?
Thanks
CJM
failed and I wasnt sure why...
snippet from original code:
oTotalFilters.Item(rsNetStock.fields("PartNo")) =
oTotalFilters.Item(rsNetStock.fields("PartNo") ) + CInt(iNumFilters)
After going back to the start, I eventually realised that the dictionary
Item property didn't like 'rsNetStock.fields("PartNo")' as a parameter, so I
had to use something like the following:
sTest = rsNetStock.fields("PartNo")
oTotalFilters.Item(sTest) = oTotalFilters.Item(sTest) + CInt(iNumFilters)
Am I missing something here? Surely, my original code should have worked?
Is this a known bug/feature?
Thanks
CJM