Calulations not displaying

Keiath

Registered User.
Local time
Today, 16:59
Joined
Jan 6, 2012
Messages
104
I am having a problem in my form,

I have a stock control that has tabs, on the tab (Activity) I have a subform that is populated by a table called Stock Activity and simply shows all the stock in and stock out.

In the footer I created a text box (text17) have this sum

=Sum([StockIn]-[StockOut]) to calculate the actual stock

On the First tab (Stock Data) I have a field called Total Stock and in that I have this:-

=[Stock Activity subform2].[Form]![Text17]

But it doesn't show the results. But if I change the =Sum([StockIn]-[StockOut]) to just =Sum([StockIn]) or visa-a-versa it displays the number

Why is this happening? Any ideas?
 
You need to handle potential nulls due to more than just the sum of a single field. Also, make sure that you do not have any control named StockIn or StockOut.

=Sum(Nz([StockIn],0)-Nz([StockOut],0))
 

Users who are viewing this thread

Back
Top Bottom