Solved

Access Formula Gone Wrong!

Posted on 2011-03-08
4
291 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
  • 2
4 Comments
 
LVL 119

Accepted Solution

by:
Rey Obrero 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Experts-Exchange is a great place to come for help with solutions for your database issues, and many problems are resolved within minutes of being posted.  Others take a little more time and effort and often providing a sample database is very helpf…
I see at least one EE question a week that pertains to using temporary tables in MS Access.  But surprisingly, I was unable to find a single article devoted solely to this topic. I don’t intend to describe all of the uses of temporary tables in t…
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 …
Basics of query design. Shows you how to construct a simple query by adding tables, perform joins, defining output columns, perform sorting, and apply criteria.

920 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now