A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Setting Up & Running Reports
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Report sums based on record dates



 
 
Thread Tools Display Modes
  #1  
Old August 20th, 2006, 08:51 PM posted to microsoft.public.access.reports
homestyle
external usenet poster
 
Posts: 5
Default Report sums based on record dates

I have a table of transactions, some with past dates, some dated the
current date, and some dated in the near future. On a report, I'm
looking for a way to get four different sums using the transactions in
the table, each sum based on the dates of the transactions. I need a
sum of transactions in the current month dated the 15 though the 31st,
the sum of transactions from next month dated 1st through 14th, the sum
of transactions next month dated 15th through 31st (or 30th depending
on the month) and the sum of transactions from the month after next
dated the 1st through the 14th.
I think I've got one working. This one seems to work for next month
dated 15th through 31st:
=Sum(IIf([DateTransaction]=DateSerial(Year(Date()),Month(Date())+1,15-0),[AmountDebit],0))

I can't figure the others out. Can anyone help me on this? I appreciate it.
  #2  
Old August 20th, 2006, 10:55 PM posted to microsoft.public.access.reports
homestyle
external usenet poster
 
Posts: 5
Default Report sums based on record dates

Original poster here. I found the answer on another forum, and I thought I
would post the solution here to help people searching on this problem.

All month
=Sum(IIf([DateTransaction]DateSerial(Year(Date()),Month(Date())+1,0),[AmountDebit],0))

One day
=Sum(IIf([DateTransaction]=DateSerial(Year(Date()),Month(Date())+1,25),[AmountDebit],0))

Current month 15th -31st =Sum(IIf([DateTransaction] Between
DateSerial(Year(Date()),Month(Date()),15) And
DateSerial(Year(Date()),Month(Date())+1,0),[AmountTrans],0))

Next month 1st-14th =Sum(IIf([DateTransaction] Between
DateSerial(Year(Date()),Month(Date())+1,0) And
DateSerial(Year(Date()),Month(Date())+1,14),[AmountTrans],0))

Next month 15th-31st =Sum(IIf([DateTransaction] Between
DateSerial(Year(Date()),Month(Date())+1,15) And
DateSerial(Year(Date()),Month(Date())+2,0),[AmountTrans],0))

Month after 1st-14th =Sum(IIf([DateTransaction] Between
DateSerial(Year(Date()),Month(Date())+2,0) And
DateSerial(Year(Date()),Month(Date())+2,14),[AmountTrans],0))


 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 12:44 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.