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 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.
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.
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. This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
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
|
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...
|
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...
|
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...
|
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...
|
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...
|
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.
...
|
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?
|
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...
|
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...
|
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
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
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...
|
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...
|
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...
|
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,...
|
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...
|
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...
|
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,...
| |