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 » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Using Numbers and decimals



 
 
Thread Tools Display Modes
  #1  
Old June 11th, 2009, 12:29 AM posted to microsoft.public.access.forms
Abe Katz
external usenet poster
 
Posts: 43
Default Using Numbers and decimals

Hello,
I have a Control Named Qty, I set the Field Size to Single, Decimal Places
to Auto.
I want to use the control with whole numbers only or with decimals. i.e. 8
or 8.33
The problem is, in the Totals query when I use the sum function, the query
will display the Qty as 8.329999.
This is how I would like to display the Qty on the query, form and report.
8 should be 8 only (no decimals or zeroes)
8.33 should be 8.33
Thanks in advance
Abe


  #2  
Old June 11th, 2009, 12:51 AM posted to microsoft.public.access.forms
Jeff Boyce
external usenet poster
 
Posts: 8,621
Default Q Using Numbers and decimals

Abe

I'm a bit puzzled ... in my world, [Qty] is an abbreviation for "quantity".

How can a quantity (i.e., a count of physical objects) be a "Single" data
type? What does it mean to have 8.33 of something?

More info, please...

Regards

Jeff Boyce
Microsoft Office/Access MVP

"Abe Katz" wrote in message
...
Hello,
I have a Control Named Qty, I set the Field Size to Single, Decimal
Places to Auto.
I want to use the control with whole numbers only or with decimals. i.e. 8
or 8.33
The problem is, in the Totals query when I use the sum function, the query
will display the Qty as 8.329999.
This is how I would like to display the Qty on the query, form and report.
8 should be 8 only (no decimals or zeroes)
8.33 should be 8.33
Thanks in advance
Abe



  #3  
Old June 11th, 2009, 01:26 AM posted to microsoft.public.access.forms
John W. Vinson
external usenet poster
 
Posts: 18,261
Default Using Numbers and decimals

On Wed, 10 Jun 2009 19:29:20 -0400, "Abe Katz" wrote:

Hello,
I have a Control Named Qty, I set the Field Size to Single, Decimal Places
to Auto.
I want to use the control with whole numbers only or with decimals. i.e. 8
or 8.33
The problem is, in the Totals query when I use the sum function, the query
will display the Qty as 8.329999.
This is how I would like to display the Qty on the query, form and report.
8 should be 8 only (no decimals or zeroes)
8.33 should be 8.33
Thanks in advance
Abe


Single and Double are "Floating Point" numbers. They're actually stored as a
binary number, which is an *approximation* - accurate to about 7 decimal
places (24 bits) for Single and 14 decimals (48 bits) for Double.

Just as a number like 1/7 cannot be depicted exactly as a decimal number (it's
0.142856142856142856.... ), a number like 8.33 cannot be depicted exactly as a
floating point number.

If you want four or fewer decimal places you can use a Currency datatype (not
the format; use Currency instead of Number as the datatype in the table design
window). If you need more, you can use a Decimal datatype - specify the total
number of digits in the Precision property and the number of digits after the
decimal in Scale. These datatypes will not have the roundoff error.
--

John W. Vinson [MVP]
  #4  
Old June 11th, 2009, 10:50 AM posted to microsoft.public.access.forms
Volker Neurath
external usenet poster
 
Posts: 4
Default Q Using Numbers and decimals

Jeff Boyce wrote:

How can a quantity (i.e., a count of physical objects) be a "Single" data
type? What does it mean to have 8.33 of something?


For instance 8.33 litres of a fluid?

Or 8.33 metres e.g. of a piece of wood, metal ?

Volker
--
Im übrigen bin ich der Meinung, dass TCPA/TCG verhindert werden muss

Wenn es vom Himmel Zitronen regnet, dann lerne, wie man Limonade macht
  #5  
Old June 11th, 2009, 03:52 PM posted to microsoft.public.access.forms
Abe Katz
external usenet poster
 
Posts: 43
Default Using Numbers and decimals

I'm sorry for the confusion. If I have 10 boxes with 6 pieces in a box = 60,
and I take out 8 pcs, I'm left with 8.67 BoxQty.

"Jeff Boyce" wrote in message
...
Abe

I'm a bit puzzled ... in my world, [Qty] is an abbreviation for
"quantity".

How can a quantity (i.e., a count of physical objects) be a "Single" data
type? What does it mean to have 8.33 of something?

More info, please...

Regards

Jeff Boyce
Microsoft Office/Access MVP

"Abe Katz" wrote in message
...
Hello,
I have a Control Named Qty, I set the Field Size to Single, Decimal
Places to Auto.
I want to use the control with whole numbers only or with decimals. i.e.
8 or 8.33
The problem is, in the Totals query when I use the sum function, the
query will display the Qty as 8.329999.
This is how I would like to display the Qty on the query, form and
report.
8 should be 8 only (no decimals or zeroes)
8.33 should be 8.33
Thanks in advance
Abe





  #6  
Old June 11th, 2009, 04:36 PM posted to microsoft.public.access.forms
Jeff Boyce
external usenet poster
 
Posts: 8,621
Default Using Numbers and decimals

Thanks for the clarification.

I'd probably disregard the [BoxQty] if I were doing this, since I'll have to
assume that a box of pencils and a box of paper towels can have differing
numbers of items. I'd probably go to the lowest unit of measure and just
use something like [UnitQty]. That way, it doesn't matter how many "boxes"
are involved...

Or maybe for your system, you MUST know the number of boxes?!

Regards

Jeff Boyce
Microsoft Office/Access MVP


"Abe Katz" wrote in message
...
I'm sorry for the confusion. If I have 10 boxes with 6 pieces in a box =
60, and I take out 8 pcs, I'm left with 8.67 BoxQty.

"Jeff Boyce" wrote in message
...
Abe

I'm a bit puzzled ... in my world, [Qty] is an abbreviation for
"quantity".

How can a quantity (i.e., a count of physical objects) be a "Single" data
type? What does it mean to have 8.33 of something?

More info, please...

Regards

Jeff Boyce
Microsoft Office/Access MVP

"Abe Katz" wrote in message
...
Hello,
I have a Control Named Qty, I set the Field Size to Single, Decimal
Places to Auto.
I want to use the control with whole numbers only or with decimals. i.e.
8 or 8.33
The problem is, in the Totals query when I use the sum function, the
query will display the Qty as 8.329999.
This is how I would like to display the Qty on the query, form and
report.
8 should be 8 only (no decimals or zeroes)
8.33 should be 8.33
Thanks in advance
Abe







  #7  
Old June 11th, 2009, 04:37 PM posted to microsoft.public.access.forms
Jeff Boyce
external usenet poster
 
Posts: 8,621
Default Q Using Numbers and decimals

Probably just a difference of semantics...

I'd only use Qty on discrete objects, and Amt on things measuable
continuously...

Regards

Jeff Boyce
Microsoft Office/Access MVP

"Volker Neurath" wrote in message
...
Jeff Boyce wrote:

How can a quantity (i.e., a count of physical objects) be a "Single" data
type? What does it mean to have 8.33 of something?


For instance 8.33 litres of a fluid?

Or 8.33 metres e.g. of a piece of wood, metal ?

Volker
--
Im übrigen bin ich der Meinung, dass TCPA/TCG verhindert werden muss

Wenn es vom Himmel Zitronen regnet, dann lerne, wie man Limonade macht



  #8  
Old June 12th, 2009, 03:23 PM posted to microsoft.public.access.forms
Volker Neurath[_2_]
external usenet poster
 
Posts: 4
Default Q Using Numbers and decimals

Jeff Boyce wrote:

Probably just a difference of semantics...


sure

I'd only use Qty on discrete objects, and Amt on things measuable
continuously...


Of course that does make things more obvious.

Volker

--
Wenn es vom Himmel Zitronen regnet -- lerne, Limonade zu machen.
  #9  
Old June 12th, 2009, 04:30 PM posted to microsoft.public.access.forms
Jeff Boyce
external usenet poster
 
Posts: 8,621
Default Q Using Numbers and decimals

"!ESCHEW OBFUSCATION!"

G

Jeff

"Volker Neurath" wrote in
message ...
Jeff Boyce wrote:

Probably just a difference of semantics...


sure

I'd only use Qty on discrete objects, and Amt on things measuable
continuously...


Of course that does make things more obvious.

Volker

--
Wenn es vom Himmel Zitronen regnet -- lerne, Limonade zu machen.



 




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


All times are GMT +1. The time now is 10:55 PM.


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