stop the automatic rounding

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have 4 number fields that should be 2 dec places, however whenever I enter
a value in one it gets rounded automatically to 0dp. In both the table and
the properties for the control itself the DP value is set to 2. Are there any
other reasons that rounding could be going on?

cheers
 
nick said:
I have 4 number fields that should be 2 dec places, however whenever
I enter a value in one it gets rounded automatically to 0dp. In both
the table and the properties for the control itself the DP value is
set to 2. Are there any other reasons that rounding could be going on?

Most likely these fields have their Field Size property set to Long
Integer or Integer (or possibly Byte). Such fields can only contain
whole numbers -- that's what integers are -- so any value you put into
them will be rounded to a whole number as it is stored. Either change
the Field Size to Single or Double (both of which are floating-point
types, and so can store fractional numbers) or, if it's appropriate,
change the fields' Data Type to Currency.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top