Syntax error

  • Thread starter ladybug via AccessMonster.com
  • Start date
L

ladybug via AccessMonster.com

I have a text box in a report that keeps giving me an error of an ivalid
syntax. The report has the fields below.

=Sum([Expr1]) =Sum([Expr2]) =Sum([Expr3]) =Sum(
[decProductionHours])

I want to add all the Sum Expr together (=Sum([Expr1]), =Sum([Expr2]), =Sum(
[Expr3]) and then divide by =Sum([decProductionHours])

I am trying to get the average in a new field.

Example:

=Sum([Expr1]) =Sum([Expr2]) =Sum([Expr3]) =Sum(
[decProductionHours])
100 50 50
8

The average should total to 25 (per hour)

Can someone help me with this code? I keep getting the syntax error or that
I have too many closing parentheses.

This is what I currently have: =((Sum([Expr1]))+(Sum([Expr2]))+(Sum([Expr3]))
/(Sum([decProductionHours])))
which of course does not work.
 
M

Marshall Barton

ladybug said:
I have a text box in a report that keeps giving me an error of an ivalid
syntax. The report has the fields below.

=Sum([Expr1]) =Sum([Expr2]) =Sum([Expr3]) =Sum(
[decProductionHours])

I want to add all the Sum Expr together (=Sum([Expr1]), =Sum([Expr2]), =Sum(
[Expr3]) and then divide by =Sum([decProductionHours])

I am trying to get the average in a new field.

Example:

=Sum([Expr1]) =Sum([Expr2]) =Sum([Expr3]) =Sum(
[decProductionHours])
100 50 50
8

The average should total to 25 (per hour)

Can someone help me with this code? I keep getting the syntax error or that
I have too many closing parentheses.

This is what I currently have: =((Sum([Expr1]))+(Sum([Expr2]))+(Sum([Expr3]))
/(Sum([decProductionHours])))
which of course does not work.

You do have an extra ) at the end of the expression.

Actually you have have more that you need and you are
missing some important parenthesis in the middle.

I think you really wanted to write:

=(Sum([Expr1])+Sum([Expr2])+Sum([Expr3]))/(Sum([decProductionHours])
 

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

Similar Threads


Top