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

Insert expression with data from a query Fails...

Status
Not open for further replies.

NikosXP

Instructor
Oct 24, 2001
13
0
0
GR
Hi...
I have a report bounded to a query which returns two fields
class,Expr1001(both included in the Report)[3 Rows].
I Also have another query that returns Expr1000.[1 row]
(the Expr1000 contains the sum of the 3 rows of Expr1001)
In order to produce percentages % I need to produce the result Expr1001/Expr1000 (*100 actually)
I construct the expression =[Expr1001]/[qryTotal]![Expr1000] but when I run the form I'm prompted to enter Parameter value for qryTotal....

Are there any Ideas?
Thanks In Advance
Nick
 
It is kind of hard to tell what is going on becuse these Expr1000 and Expr1001 do have sql structure behind them. But another way to acheive what you are trying to do is to do it in the report itself.

add a textbox and have the datasource set like this

=Sum([Expr1001])/Count([Expr1001])

Expr1000 and Expr1001 should be replaced by your report field name that contain the information.

you may want to re-evaluate your queries and maybe do not have them perform any calculations. Just gather the information need to dhave the calculations done.

HTH
 
Thanks your tip was very nice

Actually All I needed was [Expr1001]/SUM([Expr1001]) which solved the prob...
Nick
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top