A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Database Design
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Number rounding



 
 
Thread Tools Display Modes
  #1  
Old December 28th, 2004, 06:37 PM
Sam
external usenet poster
 
Posts: n/a
Default Number rounding

I have a number field. I want to enter data into as a percentage of
commission (2.25). I have tried every number combination and when I enter
2.25 it enters 2.00. It seems to round up or down on the .5. This is just a
straight entry that later may be used for calculation. What is wrong???
Thanks!
  #2  
Old December 28th, 2004, 06:43 PM
Rick B
external usenet poster
 
Posts: n/a
Default

What type of field are you using?



"Sam" wrote in message
...
I have a number field. I want to enter data into as a percentage of
commission (2.25). I have tried every number combination and when I enter
2.25 it enters 2.00. It seems to round up or down on the .5. This is

just a
straight entry that later may be used for calculation. What is wrong???
Thanks!



  #3  
Old December 28th, 2004, 06:50 PM
Lynn Trapp
external usenet poster
 
Posts: n/a
Default

It sounds like you are using an Integer datatype. Integers are whole numbers
only and have no decimal portion.

--
Lynn Trapp
MS Access MVP
www.ltcomputerdesigns.com
Access Security: www.ltcomputerdesigns.com/Security.htm


"Sam" wrote in message
...
I have a number field. I want to enter data into as a percentage of
commission (2.25). I have tried every number combination and when I enter
2.25 it enters 2.00. It seems to round up or down on the .5. This is

just a
straight entry that later may be used for calculation. What is wrong???
Thanks!



  #4  
Old December 28th, 2004, 07:09 PM
Sam
external usenet poster
 
Posts: n/a
Default

I have it as a number field. If I use text it will accept my entry as 2.25,
but I need to be able to use it as a calculation later. If I use a number
field it automatically goes to Integer. All I want to do is to be able to
enter a number as 2.25 and have it appear the same and later be able to use
as a calculation. Thanks for your help!

"Lynn Trapp" wrote:

It sounds like you are using an Integer datatype. Integers are whole numbers
only and have no decimal portion.

--
Lynn Trapp
MS Access MVP
www.ltcomputerdesigns.com
Access Security: www.ltcomputerdesigns.com/Security.htm


"Sam" wrote in message
...
I have a number field. I want to enter data into as a percentage of
commission (2.25). I have tried every number combination and when I enter
2.25 it enters 2.00. It seems to round up or down on the .5. This is

just a
straight entry that later may be used for calculation. What is wrong???
Thanks!




  #5  
Old December 28th, 2004, 07:11 PM
Sam
external usenet poster
 
Posts: n/a
Default

I have it set as a number. If I use a text field it will let me input it as
2.25, but I am going to need to be able to calculate it later. When I enter
2.25 it accepts the decimal places but displays it as 2.00. Thanks for your
help!

"Rick B" wrote:

What type of field are you using?



"Sam" wrote in message
...
I have a number field. I want to enter data into as a percentage of
commission (2.25). I have tried every number combination and when I enter
2.25 it enters 2.00. It seems to round up or down on the .5. This is

just a
straight entry that later may be used for calculation. What is wrong???
Thanks!




  #6  
Old December 28th, 2004, 07:26 PM
Rick B
external usenet poster
 
Posts: n/a
Default

Change your field size to "single"


"Sam" wrote in message
...
I have it as a number field. If I use text it will accept my entry as

2.25,
but I need to be able to use it as a calculation later. If I use a number
field it automatically goes to Integer. All I want to do is to be able to
enter a number as 2.25 and have it appear the same and later be able to

use
as a calculation. Thanks for your help!

"Lynn Trapp" wrote:

It sounds like you are using an Integer datatype. Integers are whole

numbers
only and have no decimal portion.

--
Lynn Trapp
MS Access MVP
www.ltcomputerdesigns.com
Access Security: www.ltcomputerdesigns.com/Security.htm


"Sam" wrote in message
...
I have a number field. I want to enter data into as a percentage of
commission (2.25). I have tried every number combination and when I

enter
2.25 it enters 2.00. It seems to round up or down on the .5. This is

just a
straight entry that later may be used for calculation. What is

wrong???
Thanks!






  #7  
Old December 28th, 2004, 07:30 PM
Randy Balbuena
external usenet poster
 
Posts: n/a
Default

Sam wrote:

I have a number field. I want to enter data into as a percentage of
commission (2.25). I have tried every number combination and when I enter
2.25 it enters 2.00. It seems to round up or down on the .5. This is
just a
straight entry that later may be used for calculation. What is wrong???
Thanks!


Sam,

You need to check the field's "FieldSize" property. If it is set to Integer
or Long Integer it won't allow you to store numbers with decimal portion.
That's what was suggested by Rick and Lynn earlier on this thread. You
should try the Currency data type.

--
Randy Balbuena


  #8  
Old December 28th, 2004, 08:43 PM
Lynn Trapp
external usenet poster
 
Posts: n/a
Default

Unfortunately, Access refers to the datatype as Number and the FIELD SIZE as
"Long Integer," "Single," "Double," etc. These are the actual datatypes. You
need to change the Field Size to either Single, Double, or Currency to get
what you want.

--
Lynn Trapp
MS Access MVP
www.ltcomputerdesigns.com
Access Security: www.ltcomputerdesigns.com/Security.htm


"Sam" wrote in message
...
I have it as a number field. If I use text it will accept my entry as

2.25,
but I need to be able to use it as a calculation later. If I use a number
field it automatically goes to Integer. All I want to do is to be able to
enter a number as 2.25 and have it appear the same and later be able to

use
as a calculation. Thanks for your help!

"Lynn Trapp" wrote:

It sounds like you are using an Integer datatype. Integers are whole

numbers
only and have no decimal portion.

--
Lynn Trapp
MS Access MVP
www.ltcomputerdesigns.com
Access Security: www.ltcomputerdesigns.com/Security.htm


"Sam" wrote in message
...
I have a number field. I want to enter data into as a percentage of
commission (2.25). I have tried every number combination and when I

enter
2.25 it enters 2.00. It seems to round up or down on the .5. This is

just a
straight entry that later may be used for calculation. What is

wrong???
Thanks!






 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
incorrect sums in report using 2 tables jkendrick75 Setting Up & Running Reports 22 December 13th, 2004 02:19 PM
Rounding Up to next whole number Brad New Users 6 December 5th, 2004 06:31 AM
Rounding and why must I use general number data type? Febra General Discussion 2 September 24th, 2004 05:29 PM
Rounding to a whole number Randy Setting Up & Running Reports 2 September 13th, 2004 10:20 PM


All times are GMT +1. The time now is 11:01 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.