Solved

Access 2003 - dividing number is not giving correct value (rounding why?)

Posted on 2013-01-24
4
319 Views
Last Modified: 2013-01-24
I have a simple query and I am mulitplying the LOT_SIZE*LOT_QUANTITY / LOT_PRICE so I can get a per unit cost.

Here is what I have tried:  
SAMPLE DATA:   30 size    with   11 quantity   with cost of $3341.36    (answer should be $10.13)

I am using:

Unit_Cost: [LOT_COST]\([LOT_SIZE]*[LOT_QUANTITY])
- I keep getting answer of 10. The system is rounding for me and I dont want it to.
0
Comment
Question by:allenkent
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
4 Comments
 
LVL 66

Accepted Solution

by:
Jim Horn earned 305 total points
ID: 38815565
The backslash \ character does integer math, where 7 \ 4 = 1, and not 1.75.
Perhaps you meant to do / ?
0
 
LVL 66

Expert Comment

by:Jim Horn
ID: 38815575
<in my Immediate window>

? 3341.36 \ (30 * 11)
 10

? 3341.36 / (30 * 11)
 10.1253333333333
0
 

Author Closing Comment

by:allenkent
ID: 38815581
LOL - I didnt get enough sleep last night!
0
 
LVL 66

Expert Comment

by:Jim Horn
ID: 38815605
You were just testing us to see if we were awake, we know..

Thanks for the grade.  Good luck with your project.  -Jim
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Describes a method of obtaining an object variable to an already running instance of Microsoft Access so that it can be controlled via automation.
As tax season makes its return, so does the increase in cyber crime and tax refund phishing that comes with it
Learn how to number pages in an Access report over each group. Activate two pass printing by referencing the pages property: Add code to the Page Footers OnFormat event to capture the pages as there occur for each group. Use the pages property to …
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

707 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question