Abs Formula

C

Chad

Hello, I have a formula on my report in a text box that just shows the total
delay for a crew by using the supervisors name. This information isnt stored
anywhere its just to show a percent on the report! the formula is:

=Abs(Sum([Supervisor]=â€Chad Zablackasâ€)*([DT REGULAR]+[DT MAINTENANCE]+[DT
Reason 1]+[DT Reason 2])/Abs(Sum([Supervisor]="Chad Zablackas")*[EMPLOYEE
TIME]))

I keep getting an error saying invalid syntax: Your may have entered an
operand without an operator? What am I missing in my formula? Thanks!
 
S

Steve Schapel

Chad,

It looks to me like you may have the parentheses in the wrong place.
Try like this...
=Abs(Sum(([Supervisor]=”Chad Zablackas”)*([DT REGULAR]+[DT
MAINTENANCE]+[DT Reason 1]+[DT Reason 2])))/Abs(Sum(([Supervisor]="Chad
Zablackas")*[EMPLOYEE TIME]))

I also notice you have ” and " within the expression. Change the ”s to "s.

It also seems to me that if none of the records included have
[Supervisor]="Chad Zablackas", you will get a 'division by 0' error.
 
C

Chad

Steve, Thanks for the reply! I tried the formula you gave and I am still
getting an error saying invalid syntax: Your may have entered an operand
without an operator? Also what do you mean change the "s to "s?

Thanks,
Chad

Steve Schapel said:
Chad,

It looks to me like you may have the parentheses in the wrong place.
Try like this...
=Abs(Sum(([Supervisor]=â€Chad Zablackasâ€)*([DT REGULAR]+[DT
MAINTENANCE]+[DT Reason 1]+[DT Reason 2])))/Abs(Sum(([Supervisor]="Chad
Zablackas")*[EMPLOYEE TIME]))

I also notice you have †and " within the expression. Change the â€s to "s.

It also seems to me that if none of the records included have
[Supervisor]="Chad Zablackas", you will get a 'division by 0' error.

--
Steve Schapel, Microsoft Access MVP
Hello, I have a formula on my report in a text box that just shows the total
delay for a crew by using the supervisors name. This information isnt stored
anywhere its just to show a percent on the report! the formula is:

=Abs(Sum([Supervisor]=â€Chad Zablackasâ€)*([DT REGULAR]+[DT MAINTENANCE]+[DT
Reason 1]+[DT Reason 2])/Abs(Sum([Supervisor]="Chad Zablackas")*[EMPLOYEE
TIME]))

I keep getting an error saying invalid syntax: Your may have entered an
operand without an operator? What am I missing in my formula? Thanks!
 
C

Chad

Here is what some of the report looks like if that helps!


MACHINE DELAY
SUPERVISOR EMPLOYEE HOURS WORKED DT 1 DT 2 MAINT REG
Supervisor Name Employees Name 8 0.00 0.00
0.00 2.05
Supervisor Name Employees Name 8 0.00 0.00
0.00 2.25
Supervisor Name Employees Name 8 0.25 0.00
0.00 1.98
Supervisor Name Employees Name 8 0.00 0.00
0.00 2.45
 
S

Steve Schapel

Chad,

I'm sorry, at this stage I can't see anything wrong with the syntax.

In your original post, the quote chartacters around the first "Chad
Zablackas" were not regular text quotes. It may not appeart that way to
you, I guess it depends on the formatting options in your newsreader,
among other things.

So, all I can suggest is trying again. But please manually type the
whole expression into the textbox's Control Source property, rather than
copy/paste or anything like that.
 

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