A2000: calculated fields on a report detail

  • Thread starter Thread starter A man
  • Start date Start date
A

A man

How do I calculate values in a field on a report detail?

First I have database fields called FabricBasePrice and FabricRiserI. The
report recordsource is DB3SET.*, along with fields ID, and Inactive.

In a text box on the report detail, I have the Controlsource as
FabricBasePrice, the text box is called txtFabricBasePrice.

In a new text box, called txtFabricPriceI, I want the calculated price. So I
tried these:
=FabricBasePrice + FabricRiserI

Access turns it into: =[FabricBasePrice] + [FabricRiserI]

I got an error when I previewed the report.

So I tried: =Me!FabricBasePrice + me!FabricRiserI
I got an error. Something like missing field I think.

I also tried: =Me.FabricBaePrice + Me.FabricRiserI
but got an error.

I also tried the expression builder, which basically put in the same thing I
did: =FabricBasePrice + FabricRiserI

Anyone know how I make a caculated field? Thanks.
 
Hi.
You formula =FabricBasePrice + FabricRiserI is correct and
yes this will be corrected by Access to =[FabricBasePrice]
+ [FabricRiserI].
So far so good.
Now you are getting Error# when you run the report. This
usually indicates that in the source you have a field with
the same name as this textbox "txtFabricPriceI". You may
want to rename this textbox and I think the report will
run fine.
Hope this helps.
Fons
 
Back
Top