T
Tony Williams
I'm trying to calculate for a report the previous year to date value of a
control I'm using this:
=DLookUp("[Sum of
txtDomfactot]","qryFDASalesV2","Year([txtmonthlabel])=Year([txtprevyr])")
The report is based on a query "qryFDASalesV2" and the value I'm trying to
calculate is the year to date total of "txtdomfactot" The control
"txtmonthlabel" is the current month as a mmmm yyyy date/time field and
"txtprevyr", also formatted mmmm yyyy, is a calculated control which gives
me the previous year calculated using:
=DateAdd("m",-12,[txtmonthlabel])
But I don't get the correct value showing. It does return a figure but it
doesn't equate with the total caluculated manually.
What am I doing wrong?
TIA
Tony Williams
control I'm using this:
=DLookUp("[Sum of
txtDomfactot]","qryFDASalesV2","Year([txtmonthlabel])=Year([txtprevyr])")
The report is based on a query "qryFDASalesV2" and the value I'm trying to
calculate is the year to date total of "txtdomfactot" The control
"txtmonthlabel" is the current month as a mmmm yyyy date/time field and
"txtprevyr", also formatted mmmm yyyy, is a calculated control which gives
me the previous year calculated using:
=DateAdd("m",-12,[txtmonthlabel])
But I don't get the correct value showing. It does return a figure but it
doesn't equate with the total caluculated manually.
What am I doing wrong?
TIA
Tony Williams