By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
434,677 Members | 1,136 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 434,677 IT Pros & Developers. It's quick & easy.

easy when you know how!!

P: n/a
I have a small problem with a DB that I'm sure we have all had at some time,
but for the life of me can not fix it.

I have a Main Form with 2 Subforms inside it (linked), on the bottom of each
of the subforms is a total Field eg: =sum(Materials), =Sum(Labour) on the
Main Form I have a Grand Total which is based on the subform totals
=([Materials]+[Labour]), sometimes there is NO labour or NO materials for
the job and the Grand Total does not display.

Can anyone help?

Ross
Nov 13 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
"Ross Hamilton" <oz****@hotmail.com> wrote:
I have a Main Form with 2 Subforms inside it (linked), on the bottom of
each of the subforms is a total Field eg: =sum(Materials), =Sum(Labour)
on the Main Form I have a Grand Total which is based on the subform
totals =([Materials]+[Labour]), sometimes there is NO labour or NO
materials for the job and the Grand Total does not display.


If I'm understanding you correctly I think you need to handle null values
(perhaps convert them to zeros in an in-line if?).

Regards,
Keith.
Nov 13 '05 #2

P: n/a
On 15 Oct 2004 09:23:47 +0100, Keith Wilby wrote:
"Ross Hamilton" <oz****@hotmail.com> wrote:
I have a Main Form with 2 Subforms inside it (linked), on the bottom of
each of the subforms is a total Field eg: =sum(Materials), =Sum(Labour)
on the Main Form I have a Grand Total which is based on the subform
totals =([Materials]+[Labour]), sometimes there is NO labour or NO
materials for the job and the Grand Total does not display.


If I'm understanding you correctly I think you need to handle null values
(perhaps convert them to zeros in an in-line if?).

Regards,
Keith.


Look up the Nz()) function in VBA help.

=Sum(Nz([Material],0) + Nz([Labour],0))
--
Fred
Please only reply to this newsgroup.
I do not reply to personal email.
Nov 13 '05 #3

P: n/a
Worked like a charm thanks very much.

Ross
"fredg" <fg******@example.invalid> wrote in message
news:11****************************@40tude.net...
On 15 Oct 2004 09:23:47 +0100, Keith Wilby wrote:
"Ross Hamilton" <oz****@hotmail.com> wrote:
I have a Main Form with 2 Subforms inside it (linked), on the bottom of
each of the subforms is a total Field eg: =sum(Materials), =Sum(Labour)
on the Main Form I have a Grand Total which is based on the subform
totals =([Materials]+[Labour]), sometimes there is NO labour or NO
materials for the job and the Grand Total does not display.


If I'm understanding you correctly I think you need to handle null values (perhaps convert them to zeros in an in-line if?).

Regards,
Keith.


Look up the Nz()) function in VBA help.

=Sum(Nz([Material],0) + Nz([Labour],0))
--
Fred
Please only reply to this newsgroup.
I do not reply to personal email.

Nov 13 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.