Calculated control on a report

T

Tony Williams

Can anyone see anything wrong with this?
=[Sum of txtDomfactotqtr]-(DLookUp("[Sum of
txtDomfactotqtr]","qryFDASalesv3v2","[txtmonthlabel] = #" & [txtqtr1] &
"#"))
The report is based on a query qryFDASalesv3v2
The controls Sum of txtDomfactotqtr and txtqtr1 are in the query
The control Sum of txtDomfactotqtr is an expression in the query which is
Sum([txtDomfacsoleqtr]+[txtDomfacpartqtr]) which are fields in my table
The control txtqtr1 is an expression in the query which is
DateAdd("m",-3,[txtmonthlabel])
The control txtmonthlabel is a control based on a field in the table on
which the query is based.

What I am trying to do is to calculate the difference between the total of
a field called txtDomfactotqtr for one quarter and subtract it from the
total of another quarter. What I actually get is #Error
Thanks
Tony
 
D

Duane Hookom

You state txtmonthlabel is a control. Your expression suggests that it must
be a date field in qryFDASalesv3v2.
 

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