Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Continuous Forms Calculation

Status
Not open for further replies.

ensorg

IS-IT--Management
Jan 9, 2002
229
GB
Hi,

I have a continuous form which displays all the records over a specified date range. I want to have a field in the form footer which shows the total of a specified field.

I am trying to use the following formula...
=Sum([downtime])
but when I open the form #error is displayed in this field.

Can somebody tell me the correct calculation that I should use?

Thanks

 
Hi

Assuming the name of the control in the detail section is [DownTime] your setting should work, have you checked the control name?

Regards

Ken Reay
Freelance Solutions Developer
Boldon Information Systems Ltd
UK
 
Hi again

Sorry, an after thought, are any of the values in [DownLoad] null? Regards

Ken Reay
Freelance Solutions Developer
Boldon Information Systems Ltd
UK
 
Hi Ken,

Yep the control name is correct (I think I checked this 20 times!)

There are null values, but i tried the formula...
=NZ(Sum([downtime]))
And got the same error.

 
Hi

You would need either

=Sum(Nz([downtime],0))

or in the control downtime =Nz([DownTime],0), this will mean that you cannot call this control downtime,

if that makes sense?, I am assuming that the name of the column in the table/query is DownTime and that you have named the control in the same way (a common thing to do), you would have to name your control (say) txtDownTime and its controlsource would be =Nz([DownTime],0)

Hope I have not confused you?


Regards

Ken Reay
Freelance Solutions Developer
Boldon Information Systems Ltd
UK
 
Thanks for your help Ken.

What I ended up doing was deleting the form and re-creating it, the formula then worked!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top