Hi John,
The field name is CASH, i've change it for this example, the table name is
SALES.
I've a table whith a date field, a field who have the name of the month and
a money field who is named CASH.
I want a running sum, and i write this:
RUNNINGFIELD: DSuma("CASH";"SALES";"Id <=" & [Id])
and the same query who contains this runningfield has a filter for the month
February, but the result of the runningsum is for all the year, and i want
the running sum begins the first day of the month.
This will sum all the records from SALES where the ID is less than the current
record's ID - whether the record was entered yesterday or three years ago.
Do you have a sales date? Do you in fact have the *NAME* of the month -
"Enero", "Febrero" - in the table, or a date/time field indicating the sale
date? If you have the month name, how do you distinguish January sales in 2009
from those in 2007 or 2008 or 2010?
You will need *some* additional criteria in the third argument of Dsuma to
limit the records to those prior to this record in this month. Unless you
specify it in the call to DSuma, it will look at all records in the table, and
will have no relationship to the records in the query from which you are
calling it.