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

#error trying to take a sum

Status
Not open for further replies.

Guest_imported

New member
Joined
Jan 1, 1970
Messages
0
I'm trying to take the sum of a text box across all records in a form.&nbsp;&nbsp;The value that I'm trying to sum is calculated from a moderately complex formula.&nbsp;&nbsp;Taking sums of data not calculated with this formula works fine, but the box gives an #error if I try to take the sum of a field defined by this formula.&nbsp;&nbsp;Any ideas on how to fix this?&nbsp;&nbsp;The formula giving the #error is:<br><br>=Sum([GalLTWBefore]/(1+(([TempBefore]-60)*[Forms]![Barge]![TempCorrection])))<br><br>The following displays the right results:<br><br>=([GalLTWBefore]/(1+(([TempBefore]-60)*[Forms]![Barge]![TempCorrection])))<br><br>Taking the sum of a single item like:<br><br>=Sum([GalLTWBefore])<br><br>works as well<br><br>I've been trying to figure this problem out for a while now, and I'm getting frusterated.&nbsp;&nbsp;Thanks in advance for any help you can provide.<br><br>Jeff
 
This is from Access '97 Help.<br><br>I get #Error? or #Name? when I try to display data from my subform on my main form.<br><br>To display a value from a subform on a main form, create a calculated control that refers to the subform control using the following syntax: <br>=Forms![formname]![subformname]![controlname]<br>For example, suppose you have an Orders form and an Orders Subform. In the form footer of the subform, you have a text box named OrderSubtotal that sums the records in the subform. To display the value of this control on the main form, use the following expression: <br><br>=Forms![Orders]![Orders Subform]![OrderSubtotal]. <br>To learn more about calculating a total for a group of records on a form, click&nbsp;&nbsp;.<br>If you're already using this syntax and you still get an error, check to make sure that the form, subform, and control names are correct. Make sure that the names you're referring to are the names specified in the Name property for each object. Also make sure that you're including the exclamation point in the right places. <br><br>You can also use the Expression Builder to help you refer to other controls. For information on using the Expression Builder, click&nbsp;&nbsp;. <p>DougP<br><a href=mailto: dposton@universal1.com> dposton@universal1.com</a><br><a href= > </a><br> Ask me how Bar-codes can help you be more productive.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top