0

I have a list that has several number columns:

  • number with zero decimal places (expected to be integer)
  • number with two decimal places (expected to be float)
  • calculated number with two decimal places (expected to be float).

    The problem that I am having is that when the values are read in MS Access VBA, the data size of the fields is not consistent with what I am expecting. Here is what I am seeing:

    1. number with zero decimal places (expected to be integer) = size 8 bytes
    2. number with two decimal places (expected to be float) = size 8 bytes
    3. calculated number with two decimal places (expected to be float) = size 16 bytes

As you can see, the number of decimal places does not determine the data size of the field as would be expected. These data size values are consistent whether the value is an integer (including zero) or decimal values.

Is there any way to force the field data size and/or force whether a field is an integer or float. I need to be able to differentiate (in VBA) between those that are integers and those that are floats, even if the value is zero.

I am working with SharePoint 2010 Enterprise and MS Access 2010.

1 Answer 1

0

My understanding is that the field values are stored the same under the hood no matter what the display format is. The decimal format is merely how the UI renders the value and does not affect the storage size of the value as they are all of type number when creating the column.

3
  • That would explain the first two columns that I referenced. However, the calculated number column is stored as a 16 byte long and not an 8 byte long like the others. Why the difference, they are all numbers? Commented Apr 29, 2015 at 17:26
  • it is a number, but the field type is calculated. I'm trying to track down the MS information on this Commented Apr 29, 2015 at 17:32
  • thanks for the info. I've looked for the MS info and couldn't locate it today. I appreciate you trying to track it down as well. I'll mark you first response as the answer. My only problem now is that the only way I have to differentiate between the number types is the presence of a decimal. That will work fine except for zero values. For that I guess I'm stuck. Commented Apr 30, 2015 at 1:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.