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
|
|||
|
|||
rounding problems
I have a calculated field on a form that produces a number with several
decimal places. Access will automatically round up the result to the nearest tenth. for example. the calculated field produces: 54.9876543210 access will round up to: 55.0 I want it to display: 54.9 How do I stop Access from rounding this calculated number. |
#2
|
|||
|
|||
rounding problems
Perhaps there's a difference of definition for "rounding".
The standard 'rule' for rounding would turn 54.98... into 55.0, rounded to the nearest tenth. If what you want is to discard all decimal places after the tenth, take a look at the Trunc() function. Regards Jeff Boyce Microsoft Office/Access MVP "voodoo" wrote in message ... I have a calculated field on a form that produces a number with several decimal places. Access will automatically round up the result to the nearest tenth. for example. the calculated field produces: 54.9876543210 access will round up to: 55.0 I want it to display: 54.9 How do I stop Access from rounding this calculated number. |
#3
|
|||
|
|||
rounding problems
Thanks Jeff for the timely response,
Yes, I just want Access to truncate the decimals instead of rounding them. But I can't seem to find the Trunc() function in Access. I went ahead and tried using it but Access didn't recognize it. Excel has a Trunc function but Access does not. Go figure! Any other suggestions? "Jeff Boyce" wrote in message ... Perhaps there's a difference of definition for "rounding". The standard 'rule' for rounding would turn 54.98... into 55.0, rounded to the nearest tenth. If what you want is to discard all decimal places after the tenth, take a look at the Trunc() function. Regards Jeff Boyce Microsoft Office/Access MVP "voodoo" wrote in message ... I have a calculated field on a form that produces a number with several decimal places. Access will automatically round up the result to the nearest tenth. for example. the calculated field produces: 54.9876543210 access will round up to: 55.0 I want it to display: 54.9 How do I stop Access from rounding this calculated number. |
#4
|
|||
|
|||
rounding problems
Voodoo,
I think the Trunc() funstion applies to Excel, maybe SQL. Try this instead: =Int([YourField]*100)/100 -- Gina Whipp "I feel I have been denied critical, need to know, information!" - Tremors II http://www.regina-whipp.com/index_files/TipList.htm "voodoo" wrote in message ... Thanks Jeff for the timely response, Yes, I just want Access to truncate the decimals instead of rounding them. But I can't seem to find the Trunc() function in Access. I went ahead and tried using it but Access didn't recognize it. Excel has a Trunc function but Access does not. Go figure! Any other suggestions? "Jeff Boyce" wrote in message ... Perhaps there's a difference of definition for "rounding". The standard 'rule' for rounding would turn 54.98... into 55.0, rounded to the nearest tenth. If what you want is to discard all decimal places after the tenth, take a look at the Trunc() function. Regards Jeff Boyce Microsoft Office/Access MVP "voodoo" wrote in message ... I have a calculated field on a form that produces a number with several decimal places. Access will automatically round up the result to the nearest tenth. for example. the calculated field produces: 54.9876543210 access will round up to: 55.0 I want it to display: 54.9 How do I stop Access from rounding this calculated number. |
#5
|
|||
|
|||
rounding problems
Thanks Gina,
That seemed to do the trick although I'm not sure why? To get the number to show only one decimal I did have to change your equation from: =Int([YourField]*100)/100 to: =Int([YourField]*10)/10 thanks to both of you for your help, greatly appreciated! happy programming "Gina Whipp" wrote in message ... Voodoo, I think the Trunc() funstion applies to Excel, maybe SQL. Try this instead: =Int([YourField]*100)/100 -- Gina Whipp "I feel I have been denied critical, need to know, information!" - Tremors II http://www.regina-whipp.com/index_files/TipList.htm "voodoo" wrote in message ... Thanks Jeff for the timely response, Yes, I just want Access to truncate the decimals instead of rounding them. But I can't seem to find the Trunc() function in Access. I went ahead and tried using it but Access didn't recognize it. Excel has a Trunc function but Access does not. Go figure! Any other suggestions? "Jeff Boyce" wrote in message ... Perhaps there's a difference of definition for "rounding". The standard 'rule' for rounding would turn 54.98... into 55.0, rounded to the nearest tenth. If what you want is to discard all decimal places after the tenth, take a look at the Trunc() function. Regards Jeff Boyce Microsoft Office/Access MVP "voodoo" wrote in message ... I have a calculated field on a form that produces a number with several decimal places. Access will automatically round up the result to the nearest tenth. for example. the calculated field produces: 54.9876543210 access will round up to: 55.0 I want it to display: 54.9 How do I stop Access from rounding this calculated number. |
#6
|
|||
|
|||
rounding problems
I knew I'd seen it somewhere ... g
As another alternative, setting a reference to the Excel object model and use Excel's Trunc() function in Access. Regards Jeff Boyce Microsoft Office/Access MVP "Gina Whipp" wrote in message ... Voodoo, I think the Trunc() funstion applies to Excel, maybe SQL. Try this instead: =Int([YourField]*100)/100 -- Gina Whipp "I feel I have been denied critical, need to know, information!" - Tremors II http://www.regina-whipp.com/index_files/TipList.htm "voodoo" wrote in message ... Thanks Jeff for the timely response, Yes, I just want Access to truncate the decimals instead of rounding them. But I can't seem to find the Trunc() function in Access. I went ahead and tried using it but Access didn't recognize it. Excel has a Trunc function but Access does not. Go figure! Any other suggestions? "Jeff Boyce" wrote in message ... Perhaps there's a difference of definition for "rounding". The standard 'rule' for rounding would turn 54.98... into 55.0, rounded to the nearest tenth. If what you want is to discard all decimal places after the tenth, take a look at the Trunc() function. Regards Jeff Boyce Microsoft Office/Access MVP "voodoo" wrote in message ... I have a calculated field on a form that produces a number with several decimal places. Access will automatically round up the result to the nearest tenth. for example. the calculated field produces: 54.9876543210 access will round up to: 55.0 I want it to display: 54.9 How do I stop Access from rounding this calculated number. |
#7
|
|||
|
|||
rounding problems
Voodoo,
Oops, one extra '0', sorry about that. Somewhere there is a simple explanation but I don't remember it. -- Gina Whipp "I feel I have been denied critical, need to know, information!" - Tremors II http://www.regina-whipp.com/index_files/TipList.htm "voodoo" wrote in message ... Thanks Gina, That seemed to do the trick although I'm not sure why? To get the number to show only one decimal I did have to change your equation from: =Int([YourField]*100)/100 to: =Int([YourField]*10)/10 thanks to both of you for your help, greatly appreciated! happy programming "Gina Whipp" wrote in message ... Voodoo, I think the Trunc() funstion applies to Excel, maybe SQL. Try this instead: =Int([YourField]*100)/100 -- Gina Whipp "I feel I have been denied critical, need to know, information!" - Tremors II http://www.regina-whipp.com/index_files/TipList.htm "voodoo" wrote in message ... Thanks Jeff for the timely response, Yes, I just want Access to truncate the decimals instead of rounding them. But I can't seem to find the Trunc() function in Access. I went ahead and tried using it but Access didn't recognize it. Excel has a Trunc function but Access does not. Go figure! Any other suggestions? "Jeff Boyce" wrote in message ... Perhaps there's a difference of definition for "rounding". The standard 'rule' for rounding would turn 54.98... into 55.0, rounded to the nearest tenth. If what you want is to discard all decimal places after the tenth, take a look at the Trunc() function. Regards Jeff Boyce Microsoft Office/Access MVP "voodoo" wrote in message ... I have a calculated field on a form that produces a number with several decimal places. Access will automatically round up the result to the nearest tenth. for example. the calculated field produces: 54.9876543210 access will round up to: 55.0 I want it to display: 54.9 How do I stop Access from rounding this calculated number. |
#8
|
|||
|
|||
rounding problems
Jeff,
Can you help Voodoo out with why this (=Int([YourField]*100)/100) works? I just don't remember WHY it works. -- Gina Whipp "I feel I have been denied critical, need to know, information!" - Tremors II http://www.regina-whipp.com/index_files/TipList.htm "Jeff Boyce" wrote in message ... I knew I'd seen it somewhere ... g As another alternative, setting a reference to the Excel object model and use Excel's Trunc() function in Access. Regards Jeff Boyce Microsoft Office/Access MVP "Gina Whipp" wrote in message ... Voodoo, I think the Trunc() funstion applies to Excel, maybe SQL. Try this instead: =Int([YourField]*100)/100 -- Gina Whipp "I feel I have been denied critical, need to know, information!" - Tremors II http://www.regina-whipp.com/index_files/TipList.htm "voodoo" wrote in message ... Thanks Jeff for the timely response, Yes, I just want Access to truncate the decimals instead of rounding them. But I can't seem to find the Trunc() function in Access. I went ahead and tried using it but Access didn't recognize it. Excel has a Trunc function but Access does not. Go figure! Any other suggestions? "Jeff Boyce" wrote in message ... Perhaps there's a difference of definition for "rounding". The standard 'rule' for rounding would turn 54.98... into 55.0, rounded to the nearest tenth. If what you want is to discard all decimal places after the tenth, take a look at the Trunc() function. Regards Jeff Boyce Microsoft Office/Access MVP "voodoo" wrote in message ... I have a calculated field on a form that produces a number with several decimal places. Access will automatically round up the result to the nearest tenth. for example. the calculated field produces: 54.9876543210 access will round up to: 55.0 I want it to display: 54.9 How do I stop Access from rounding this calculated number. |
#9
|
|||
|
|||
rounding problems
"fraid I can't ... if it needs to be tenths, I don't see how Int() gets
there! Regards Jeff Boyce Microsoft Office/Access MVP "Gina Whipp" wrote in message ... Jeff, Can you help Voodoo out with why this (=Int([YourField]*100)/100) works? I just don't remember WHY it works. -- Gina Whipp "I feel I have been denied critical, need to know, information!" - Tremors II http://www.regina-whipp.com/index_files/TipList.htm "Jeff Boyce" wrote in message ... I knew I'd seen it somewhere ... g As another alternative, setting a reference to the Excel object model and use Excel's Trunc() function in Access. Regards Jeff Boyce Microsoft Office/Access MVP "Gina Whipp" wrote in message ... Voodoo, I think the Trunc() funstion applies to Excel, maybe SQL. Try this instead: =Int([YourField]*100)/100 -- Gina Whipp "I feel I have been denied critical, need to know, information!" - Tremors II http://www.regina-whipp.com/index_files/TipList.htm "voodoo" wrote in message ... Thanks Jeff for the timely response, Yes, I just want Access to truncate the decimals instead of rounding them. But I can't seem to find the Trunc() function in Access. I went ahead and tried using it but Access didn't recognize it. Excel has a Trunc function but Access does not. Go figure! Any other suggestions? "Jeff Boyce" wrote in message ... Perhaps there's a difference of definition for "rounding". The standard 'rule' for rounding would turn 54.98... into 55.0, rounded to the nearest tenth. If what you want is to discard all decimal places after the tenth, take a look at the Trunc() function. Regards Jeff Boyce Microsoft Office/Access MVP "voodoo" wrote in message ... I have a calculated field on a form that produces a number with several decimal places. Access will automatically round up the result to the nearest tenth. for example. the calculated field produces: 54.9876543210 access will round up to: 55.0 I want it to display: 54.9 How do I stop Access from rounding this calculated number. |
#10
|
|||
|
|||
rounding problems
Someone told me once and it was so simple... HOPEFULLY, they will see this
and provide an answer. Of course, I know what I will be doing tonight! -- Gina Whipp "I feel I have been denied critical, need to know, information!" - Tremors II http://www.regina-whipp.com/index_files/TipList.htm "Jeff Boyce" wrote in message ... "fraid I can't ... if it needs to be tenths, I don't see how Int() gets there! Regards Jeff Boyce Microsoft Office/Access MVP "Gina Whipp" wrote in message ... Jeff, Can you help Voodoo out with why this (=Int([YourField]*100)/100) works? I just don't remember WHY it works. -- Gina Whipp "I feel I have been denied critical, need to know, information!" - Tremors II http://www.regina-whipp.com/index_files/TipList.htm "Jeff Boyce" wrote in message ... I knew I'd seen it somewhere ... g As another alternative, setting a reference to the Excel object model and use Excel's Trunc() function in Access. Regards Jeff Boyce Microsoft Office/Access MVP "Gina Whipp" wrote in message ... Voodoo, I think the Trunc() funstion applies to Excel, maybe SQL. Try this instead: =Int([YourField]*100)/100 -- Gina Whipp "I feel I have been denied critical, need to know, information!" - Tremors II http://www.regina-whipp.com/index_files/TipList.htm "voodoo" wrote in message ... Thanks Jeff for the timely response, Yes, I just want Access to truncate the decimals instead of rounding them. But I can't seem to find the Trunc() function in Access. I went ahead and tried using it but Access didn't recognize it. Excel has a Trunc function but Access does not. Go figure! Any other suggestions? "Jeff Boyce" wrote in message ... Perhaps there's a difference of definition for "rounding". The standard 'rule' for rounding would turn 54.98... into 55.0, rounded to the nearest tenth. If what you want is to discard all decimal places after the tenth, take a look at the Trunc() function. Regards Jeff Boyce Microsoft Office/Access MVP "voodoo" wrote in message ... I have a calculated field on a form that produces a number with several decimal places. Access will automatically round up the result to the nearest tenth. for example. the calculated field produces: 54.9876543210 access will round up to: 55.0 I want it to display: 54.9 How do I stop Access from rounding this calculated number. |
|
Thread Tools | |
Display Modes | |
|
|