Solved

Access Formula Gone Wrong!

Posted on 2011-03-08
4
295 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

Ransomware: The New Cyber Threat & How to Stop It

This infographic explains ransomware, type of malware that blocks access to your files or your systems and holds them hostage until a ransom is paid. It also examines the different types of ransomware and explains what you can do to thwart this sinister online threat.  

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.
Preparing an email is something we should all take special care with – especially when the email is for somebody you may not know very well. The pressures of everyday working life stacked with a hectic office environment can make this a real challen…
In Microsoft Access, when working with VBA, learn some techniques for writing readable and easily maintained code.
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…

691 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