I currently have a table in SQL. One of my fields is a MONEY data type
field. Is there anyway to drop off anything after the decimal point and make
the values in there whole numbers?
Eric - 19 May 2008 14:39 GMT
You could try the Round Function:
Dim MyVar, pi
pi = 3.14159
MyVar = Round(pi, 2) ' MyVar contains 3.14.
Use 0 to make the number 3
> I currently have a table in SQL. One of my fields is a MONEY data type
> field. Is there anyway to drop off anything after the decimal point and make
> the values in there whole numbers?
BruceM - 19 May 2008 15:08 GMT
It depends on what exactly you are trying to do. Assuming you mean it is a
Currency field, you can change the Decimal Places (in table design view) to
0. This will round the number. If you want to allow users to enter exact
decimal values, but display only the whole dollar, you can use code or
formatting on the form or report. If you want the integer portion of the
number regardless of the decimal value, try the Int function.
>I currently have a table in SQL. One of my fields is a MONEY data type
> field. Is there anyway to drop off anything after the decimal point and
> make
> the values in there whole numbers?