473,396 Members | 2,082 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

easy when you know how!!

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
3 1053
"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
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

14
by: Larry Woods | last post by:
I need to execute a Windows script (wscript/cscript) from an ASP page for some administrative functions. Anyone doing this? If so, how? TIA, Larry Woods
1
by: francisco lopez | last post by:
ok here is what I have in mind. everyone knows that when I press control+F I have the possibility to search for a word in a hmtl page. well I know there is a javascript which do the same, I saw...
10
by: jeff regoord | last post by:
A user inputs a float value. The scanf() function gets the value. However, I need to create an error handler with an if else statement saying invalid input if the input is not a number. Does...
9
by: Jim H | last post by:
In one of my functions I create a char string s, of dynamic allocated length. I want to free the memory before my function returns. Everywhere I find says free(s) is the way to do this, but I'm...
14
by: WUV999U | last post by:
Hi I am fairly familiar in C but not much. I want to know how I can write a html parser in C that only parses for the image file in the html file and display or print all the images found in...
8
by: Phill | last post by:
Anyone know the internal working of this thing. I expected it to be kinda slow at enumerating large lists of objects but it was actually pretty good. I was able to write a quick linked list class...
13
by: lovecreatesbeauty | last post by:
/* How do free() know how many elements should be freed in a dynamic array? When free a single variable, the amount of byte of memory can be retrieved from the type of variable itself. ...
3
by: Marc | last post by:
Anyone know how to add a drop down menu to a button that will appear when you right click the mouse?
0
by: kavan | last post by:
hello dear all please kindly explain me. I want to know how can i know when user close the browser. I found many sample in some forum but i don't think it not a good...
1
by: captainphoenix | last post by:
all in vb2005 I have three arrays: one 2d array, two 1d arrays. I need to output them into a listbox and align them to columns, which I know how to do using string.format(blahblahblah). However, in...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.