YTD & MTD totals on a form

  • Thread starter Comcast News Groups
  • 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
 
J

John Vinson

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()).
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top