Very very simple calculated field prob

colinmunnelly

Registered User.
Local time
Today, 00:28
Joined
Feb 26, 2002
Messages
89
I have a really simple problem regarding a calculated field on a report. It is:

I have a 2 fields on a form that show the a number of days each. These fields are works_impact and procurement_impact.

I want to make theses fields invisible and place a text box simply to add the two figures together. I have tried useing the expression as follows in the new text box but this shows no data:

=([works_impact])+([procurement])

These boxes are all placed and need to be placed within the detail section of the report. Any ideas???
 
You've said the names of the fields but what are the names of the bound controls? :p

Also, you've said one was called procurement_impact but only referred to it in your expression as procurement.
 
Yes sorry they are the bound fields and also the names. The ref towas a mistype it should have read procurement_impact.
 
=Nz([works_impact],0)+Nz([procurement],0)

The Nz() function should solve the problem if it is being caused because one of the fields is null. The name of the control (the name field on the Other tab) that contains this expression MUST NOT duplicate any name from the form's recordsource.
 
thanks very much. I managed to sort the problem by doing the calculation in a query. But appreciate your reply.
 
Best to do calculations on the form/report as you get better performance doing it this way as calculations can slow down queries (no matter how unnoticeable it seems).
 

Users who are viewing this thread

Back
Top Bottom