YTD & MTD totals on a form

  • Thread starter Thread starter Comcast News Groups
  • Start date Start date
C

Comcast News Groups

have a field InvoiceDate (table "Clients") and a field InvoiceTotal (table
"Checks"). I am trying to create a form that will display the sum of
InvoiceTotal as YearToDate in one box and MonthToDate in
another box.

Any help?

TIA
R. Fisher
 
have a field InvoiceDate (table "Clients") and a field InvoiceTotal (table
"Checks"). I am trying to create a form that will display the sum of
InvoiceTotal as YearToDate in one box and MonthToDate in
another box.

To just display them, consider using the DSum function as the control
source of the textbox:

=DSum("[InvoiceTotal]", "[Checks]", "[ClientID] = " & [txtClientID] &
" AND InvoiceDate > DateSerial(Year(Date()), Month(Date()), 1)")

same for year to date, just use 1 instead of Month(Date()).
 
Back
Top