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

Expression Error #Name? 1

Status
Not open for further replies.

Gwen52

Technical User
Aug 5, 2000
3
0
0
US
What is wrong with this expression?<br>=sum([RETAIL REVENUE]+[CONCESSION REVENUE]+[PARKING REVENUE])<br>I am working on form fields with expression builder and these three categories need to be send to a form field named TOTAL REVENUE.<br>I am highlighting the field TOTAL REVENUE and typing the above expression.<br>Any suggestions?<br>Thanks!
 
Are all three of those fields in the underlying table or query? If so, perhaps you may want to call the total revenue field just total or total_revenue.<br><br>Check out help under that error expression--it gives a list of things to check-- <p>jgarnick<br><a href=mailto:jgarnick@aol.com>jgarnick@aol.com</a><br><a href= > </a><br>
 
If these are references in a form, you don't need the Sum().<br><br>I assume the all or the revenues are Currency datatypes.<br>Total Revenue's control source should be:<br><br>=[Retail Revenue]+[Concession Revenue]+[Parking Revenue]<br><br>The format for this field should also be set to Currency.<br><br>HTH<br>RDH <p>Ricky Hicks<br><a href=mailto: rdhicks@mindspring.com> rdhicks@mindspring.com</a><br><a href= > </a><br>
 
Using the example above, but on a report...<br><br>It seems that you have to create 3 controls on the report with the field from table/query as the control source. e.g. <br><br><FONT FACE=monospace>=[Retail Revenue]<br>=[Concession Revenue]</font><br><br>The 'sum' control then needs to reference the controls on the report, not the fields from the table/query. - Obviously you make the 3 control not visible etc.<br><br>If you refer to the fields in the table/query directly you get #Name (or is it #Error ... at least some kind of error)<br><br>Is that correct?<br>If so, does anyone know why?
 
My best guess is that there is at least one control name on the report that matches the name of one of the fields being summarized, and the calculation is unsure of which to use.&nbsp;&nbsp;<br><br>It's typical to find the sum of fields in a report.<br><br>pre-caffeine,<br>Drew
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top