Access Calculation Error on Access 03 Report


Joined
Feb 10, 2010
Messages
1
Reaction score
0
I am receiving an error when trying to do a summation for a field on an access report. The error is: "This expression is typed incorrectly, or it is to complex to be evaluated. For example, a numeric expression may contain too many complicated elements. Try simplifying the expression by assigning parts of the expression to variables."

The calculation that I am doing on the report is:
=(Int(Sum([drv_time_elapsed1])/60)) & ":" & Format(((Sum([drv_time_elapsed1])/60)-Int(Sum([drv_time_elapsed1])/60))*60,"00")

The field drv_time_elapsed1 is being created in a query:
drv_time_elapsed1: CInt(IIf(([drv_time_elapsed]=" "),0,([drv_time_elapsed])))

The query itself runs successfully, but when I try to sum the field on the report I get the error. I have even tried to simplify the sum, by just doing a basic sum: =Sum([drv_time_elapsed1]), and that doesn't work either.

Please help, I am ready to scream!!
Thanks
Laura
 
Ad

Advertisements

Joined
Feb 25, 2010
Messages
16
Reaction score
0
Your problem may be in handling NULL values. Access will not process an function containing a NULL without catching it with NZ funtion:

CInt(IIf((nz([drv_time_elapsed])=" "),0,(nz([drv_time_elapsed]))))
 

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