x
Solved

Access programming

Posted on 2011-09-22
Medium Priority
321 Views
Ok, I have this access thing I've been working on all day and I cant seem to get the formula right. Or maybe it cant do it the way I want it to.

I have a report based on a query. The query has all the information I'm looking for a needing. scenario is as follows.

Sample report of what it currently does

CustomerName     Order Number    Qty   DaysLate    Order Dollars     Dollars Late

ABCD                      6582                   2           30            7,000                  42,0000
Sample                    9324                   1           2              5,000                  10,000
Test                         9499                   1           5              1,000                   5,000

Sum                                                                                12,000                 52,000

What I want it to do:

CustomerName     Order Number    Qty   DaysLate    Order Dollars     Dollars Late

ABCD                      6582                   2           30            7,000                  42,0000
Sample                    9324                   1           2              5,000                  10,000
Test                         9499                   1           5              1,000                   5,000

Sum                                                                                12,000                 52,000
9*** Sum                                                                                                     15,000

I want to add a number at the end or another sum line to sum up every order number that starts with a 9. the 15,000 is what I want it to total for me along with everything else.

Question is 1: Do I do this in the report, or do I do this in the Query?
Question 2 is: How would the formula look.

Formula for the Dollars late summary is =Sum([Dollars Late])

I want it something like this =Sum([Dollars Late] IIf([CUST_ORDER_ID]>="9000" And [CUST_ORDER_ID]<="9999"))

I might need to provide more information, but This is a start.
0
Question by:Keef400
• 2
• 2

LVL 93

Accepted Solution

Patrick Matthews earned 2000 total points
ID: 36583298
Close!

=Sum(IIf([CUST_ORDER_ID] Like "9*", [Dollars Late], 0))
0

Author Comment

ID: 36583350
AHHHH!!!! seems so simple now. I guess I was over complicating it. Thank you very much, and thank you even more for understanding what I was asking for.
0

Author Closing Comment

ID: 36583355
Very quick, Thank you!
0

LVL 93

Expert Comment

ID: 36583394
0

Featured Post

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.