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. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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 | |
|
|