Wrox Home  
Search P2P Archive for: Go

  Return to Index  

asp_databases thread: Re: Display Percents


Message #1 by "Ken Schaefer" <ken@a...> on Tue, 12 Mar 2002 16:18:50 +1100
Wendy,



Don't use Currency - use a Double (or single).



The default when you choose a "Number" type of field is "Long Integer". An

integer is always a whole number, hence the rounding you were experiencing.

You can read more about these datatypes in Access' Online Help.



If you are still having problems, please post the code (and SQL statement)

that you are using.



Cheers

Ken



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

From: "Wendy Homola" <wendy@p...>

Subject: [asp_databases] Display Percents





:

: I am creating an Interest Rates database for the web using Access and

: ASP.  My first problem came up when my Access database kept rounding all

: my numbers.  I discovered within the Access Help that I needed to have the

: format set as currency to avoid the rounding.

:

: I got this to work all fine and good - displaying as percentages within my

: ASP pages with the FormatPercent function.  My problem now is with my

: admin page.  So, my question...  What is the easiest way to convert the

: percent back into currency so that when the rates are modified I won't get

: a type mismatch error?



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~



Message #2 by "Wendy Homola" <wendy@p...> on Tue, 12 Mar 2002 01:05:36

I am creating an Interest Rates database for the web using Access and 

ASP.  My first problem came up when my Access database kept rounding all 

my numbers.  I discovered within the Access Help that I needed to have the 

format set as currency to avoid the rounding.  



I got this to work all fine and good - displaying as percentages within my 

ASP pages with the FormatPercent function.  My problem now is with my 

admin page.  So, my question...  What is the easiest way to convert the 

percent back into currency so that when the rates are modified I won't get 

a type mismatch error?



Thanks for the help in advance!

  Return to Index