-----Original Message-----
You want the textbox on the main form to show a zero if there are no data in
the subform? Otherwise, it's a sum of that subform's column?
In the subform's footer, put a hidden textbox (name it txtSum) and use it to
sum the column. It's control source should be
=Sum(Nz([NameOfSubformField],0))
In the main form's textbox, use a control source similar to this:
=IIf(IsError([Subform].[Form].[txtSum]), 0, [Subform]. [Form].[txtSum])
Subform is the name of the subform control (the control that holds the
subform).
--
Ken Snell
<MS ACCESS MVP>
As first, thank You for your kindness.
I have Select Query based on table. The Query fills
subform-Child. There are 2 columns in this subform.
On the main form I have textbox with sum of second column
in subform.
In case that there is no data, I want to display msgbox to
inform that sum/total of one column is 0 (currency).
But, how should I express something like:
If query result has no data, then sum of column is zero.
I want to write code but how to express qery result?
(sory about my english I'm trying)
similar
process. Post more result")
if
.