Solved

Access programming

Posted on 2011-09-22
4
304 Views
Last Modified: 2012-06-21
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
Comment
Question by:Keef400
  • 2
  • 2
4 Comments
 
LVL 92

Accepted Solution

by:
Patrick Matthews earned 500 total points
ID: 36583298
Close!

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

Author Comment

by:Keef400
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

by:Keef400
ID: 36583355
Very quick, Thank you!
0
 
LVL 92

Expert Comment

by:Patrick Matthews
ID: 36583394
Glad to help :)
0

Featured Post

Get up to 2TB FREE CLOUD per backup license!

An exclusive Black Friday offer just for Expert Exchange audience! Buy any of our top-rated backup solutions & get up to 2TB free cloud per system! Perform local & cloud backup in the same step, and restore instantly—anytime, anywhere. Grab this deal now before it disappears!

Join & Write a Comment

Whether you've completed a degree in computer sciences or you're a self-taught programmer, writing your first lines of code in the real world is always a challenge. Here are some of the most common pitfalls for new programmers.
Whether you’re a college noob or a soon-to-be pro, these tips are sure to help you in your journey to becoming a programming ninja and stand out from the crowd.
The view will learn how to download and install SIMTOOLS and FORMLIST into Excel, how to use SIMTOOLS to generate a Monte Carlo simulation of 30 sales calls, and how to calculate the conditional probability based on the results of the Monte Carlo …
The viewer will learn how to create two correlated normally distributed random variables in Excel, use a normal distribution to simulate the return on different levels of investment in each of the two funds over a period of ten years, and, create a …

708 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

17 Experts available now in Live!

Get 1:1 Help Now