Can you post the error message that you are getting? Mike Rohde
rohdem@marshallengines.com "If builders built buildings the way programmers wrote programs, the first woodpecker to come along would destroy civilization!"
thanks for the reply. I just found out that the query didn't return anything because I forgot to assign the return value to the function itself......
However, I do now face another problem,
How to get the most recent month value, exp. if my records show March-June, I just need to have June records. So, the records need to be displayed as per the last month.
This will limit the results to the current month Mike Rohde
rohdem@marshallengines.com "If builders built buildings the way programmers wrote programs, the first woodpecker to come along would destroy civilization!"
Thanks Mike. It might work.
However,
how if the data is pulled on June for period of (April, May, June), where in June, there's no order. The last one is still May.
I'm not sure I understand your problem. If you run the query in June, you should only get June records. Isn't that what you want? Mike Rohde
rohdem@marshallengines.com "If builders built buildings the way programmers wrote programs, the first woodpecker to come along would destroy civilization!"
Sorry about that Mike.
I'm running the query a month after the last period because I'm making a statement based on the past months.
Well, your idea is working though. Because actually what I need will be substracting it with 1, right....
Once again, my neglectance.
Thanks a lot for the idea. It does help!! I vote one for you above....
Right, if you subtract one from the month(date()), that will give you last months totals. If you want all data except the current month, you could use <> month(date()) for the criteria.
Sounds like your on the right track....
Thanks for the vote. Mike Rohde
rohdem@marshallengines.com "If builders built buildings the way programmers wrote programs, the first woodpecker to come along would destroy civilization!"
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.