Solved

Access Formula Gone Wrong!

Posted on 2011-03-08
4
294 Views
Last Modified: 2012-05-11
Hello Everyone,
We have a Query that is used to calculate the employees profit:
Profit: (([GPACT_AMT]+[GPBONUS_AMT]+[GPSUBSID_AMT]+[GPSUB2_AMT]+[GPSUB3_AMT]+[GPFEAT_TOT]+[GPSALES_AMT])-[GPCOST])

Now this query work fine most of the time except when there is a return and so we could get numbers like this:

Profit: (([-290]+[0]+[0]+[0]+[0]+[-7]+[-299.95])-[404.95])
The Number should be -$192 instead it calculates out as -$1001.9

Can anyone elaborate a better way to present this formula so it works correctly?

Thanks Again!
Jester

0
Comment
Question by:smart2009
[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
  • 2
4 Comments
 
LVL 120

Accepted Solution

by:
Rey Obrero (Capricorn1) earned 250 total points
ID: 35075206
there is nothing wrong with the formula.
it gives the correct total

explain why you think otherwise
0
 
LVL 19

Assisted Solution

by:Eric Sherman
Eric Sherman earned 250 total points
ID: 35075336
I agree ... if it's a return wouldn't you want to offset (subtract) from your regular sales as shown in your example???

ET
0
 

Author Closing Comment

by:smart2009
ID: 35076109
Thanks Again!
0
 

Author Comment

by:smart2009
ID: 35076118
Sorry it doesn't appear to have added my comment. The issue was that GPCOST was supposed to always be a positive number and the Point of Sale System had a glitch and had placed negative numbers for that field. It has been resolved. Thanks again!

Jester
0

Featured Post

Independent Software Vendors: 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

Phishing attempts can come in all forms, shapes and sizes. No matter how familiar you think you are with them, always remember to take extra precaution when opening an email with attachments or links.
Did you know that more than 4 billion data records have been recorded as lost or stolen since 2013? It was a staggering number brought to our attention during last week’s ManageEngine webinar, where attendees received a comprehensive look at the ma…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
In Microsoft Access, learn the trick to repeating sub-report headings at the top of each page. The problem with sub-reports and headings: Add a dummy group to the sub report using the expression =1: Set the “Repeat Section” property of the dummy…

733 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