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

Sum values of calculated control

Status
Not open for further replies.

TTThio

Programmer
May 3, 2001
185
US
Hello,

I have a unbound txtbox1 which looks up value in the underlying query. Then I have another unbound txtbox2 to sum up the values in txtbox1 using this formula:
=sum([Forms]![Form1]![txtbox1])
But it keeps show #error#.

What happens?

Thanks ahead!
 
You normally get #error when there is a lack of records matching the criteria specified by the equation. Check that there are records in the query for what you are trying to sum.
Joe Miller
joe.miller@flotech.net
 
The dlookup function is the control source of the textbox1.
So, the values are not stored to any query or table.
I try to sum up the values in other textbox (also unbound)because I need to do a cummulative calculation, where total lookup values + current record value.



 
In the after update of the control that you are entering in the data that is being added put in a line that refreshes your Total box. Something like this:

[tt]
MyTotalBox.Requery
[/tt]

Hope that helps! Joe Miller
joe.miller@flotech.net
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top