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 derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

"#Error" for some reason! 1

Status
Not open for further replies.

TZyk2003

Programmer
Jun 17, 2003
33
US
Hey everyone...good morning!

Anyone know why this control source gives me an "#Error"...doesn't make sense...I checked all the "("s and ")"s and it looks right.
The fields are all perfectly accurate - the query is correct. I added the spaces to make it easy to read for ya.

=IIf(

(Sum([qry]![Test_Cond_Cycle_1_Plan_eBAT_REG_CLA]+[qry]![Test_Cond_Cycle_1_Plan_eBAT]+[qry]![Test_Cond_Cycle_1_Plan_eBAT_REG_ENT]+[qry]![Test_Cond_Cycle_1_Plan_eBAT_REG_FUNC]))>0,

(Sum([qry]![eBAT_Weighted_1_PROG]+[qry]![eBAT_Weighted_1_REG_ENT]+[qry]![eBAT_Weighted_1_REG_CLA]+[qry]![eBAT_Weighted_1_REG_FUNC])/Sum([qry]![Test_Cond_Cycle_1_Plan_eBAT_REG_CLA]+[qry]![Test_Cond_Cycle_1_Plan_eBAT]+[qry]![Test_Cond_Cycle_1_Plan_eBAT_REG_ENT]+[qry]![Test_Cond_Cycle_1_Plan_eBAT_REG_FUNC]))/100,

'NA')

It's driving me crazy! THANKS!!

-Tim
 
Actually guys: When I insert ONLY this I still get an #Error.

Sum([qry]![Test_Cond_Cycle_1_Plan_eBAT_REG_CLA]+[qry]![Test_Cond_Cycle_1_Plan_eBAT]+[qry]![Test_Cond_Cycle_1_Plan_eBAT_REG_ENT]+[qry]![Test_Cond_Cycle_1_Plan_eBAT_REG_FUNC])

Why does this cause an error??? Why can't it sum those values up???

Thanks!!

-Tim
 
Tim,

Are you sure these names are accurate??
[tt]
[qry]![Test_Cond_Cycle_1_Plan_eBAT_REG_CLA]

[qry]![Test_Cond_Cycle_1_Plan_eBAT_REG_ENT][/tt]

Did you use the Expression Builder to create this?? Should they be something like this:??
[tt]
[qry]![Test_Cond_Cycle_1_Plan_eBAT]![REG_CLA]

[qry]![Test_Cond_Cycle_1_Plan_eBAT]![REG_ENT][/tt]


Hoc nomen meum verum non est.
 
Hey CosmoKramer...thanks for the reply.

Yes,
[qry]![Test_Cond_Cycle_1_Plan_eBAT_REG_CLA]

is the correct name. They are each individual fields in the tables.

Any ideas??? I'm stuck!

Thanks!

-Tim
 
If [tt][Test_Cond_Cycle_1_Plan_eBAT_REG_CLA] [/tt] is truly the name of a field and the query in question is the recordsource of the report, then your statement could/should look something like this:
Code:
=Sum([Test_Cond_Cycle_1_Plan_eBAT_REG_CLA]+[Test_Cond_Cycle_1_Plan_eBAT]+[Test_Cond_Cycle_1_Plan_eBAT_REG_ENT]+[Test_Cond_Cycle_1_Plan_eBAT_REG_FUNC])

Also, in which section of your report is this control located??


Hoc nomen meum verum non est.
 
Ahh....that works.....just take of the [qry] part. Thanks!

-Tim
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top