Help | Site Map
Connecting Tech Pros Worldwide
 
 
LinkBack Thread Tools
  #1  
Old November 13th, 2005, 11:41 AM
Tempy
Guest
 
Posts: n/a
Default Adding up field from a table

good day,

As i have stated before i am a newbie at this game.

I have a table "tblQSPTotals" that has 6 different QSP's on field
"QSPName" and "Project Parts". Under "Project Parts" are total number of
parts for the particular QSP, i now have a form "frmTmManagers" with the
managers of the various departments on and i want to put in a total of
all the QSP parts from the "tblQSPTotals" in a text box on the
frmTmManagers.

Could you please give me suggestions/code that i could use

Thanks in advance

Tempy

*** Sent via Developersdex http://www.developersdex.com ***
  #2  
Old November 13th, 2005, 11:42 AM
Tom van Stiphout
Guest
 
Posts: n/a
Default Re: Adding up field from a table

On Thu, 09 Jun 2005 09:13:55 GMT, Tempy <anonymous@devdex.com> wrote:

I'm not sure what exactly you're trying to do, but DSum is a function
you can use to add up values.

-Tom.

[color=blue]
>good day,
>
>As i have stated before i am a newbie at this game.
>
>I have a table "tblQSPTotals" that has 6 different QSP's on field
>"QSPName" and "Project Parts". Under "Project Parts" are total number of
>parts for the particular QSP, i now have a form "frmTmManagers" with the
>managers of the various departments on and i want to put in a total of
>all the QSP parts from the "tblQSPTotals" in a text box on the
>frmTmManagers.
>
>Could you please give me suggestions/code that i could use
>
>Thanks in advance
>
>Tempy
>
>*** Sent via Developersdex http://www.developersdex.com ***[/color]

  #3  
Old November 13th, 2005, 11:42 AM
Tempy
Guest
 
Posts: n/a
Default Re: Adding up field from a table

Hi, I have tried the following in the control Source of the text box:-

=DSum("[Kufner]+[Steyn]+[Remondini]+[Stadler]","tblTotalByrSuppliers")

In Other words i need to add the value of [kufner] (1), the value of
[Steyn](0), [Remondini](0)& [Stadler](1), giving me a total of 2.

I know it is not correct, but maybe this will give you an idea of what i
am trying to achieve, maybe there is a way with code ?

Tempy

*** Sent via Developersdex http://www.developersdex.com ***
  #4  
Old November 13th, 2005, 11:42 AM
Tempy
Guest
 
Posts: n/a
Default Re: Adding up field from a table

Hi I have eventually got it to work with the following:
=DSum("[Kufner]+[Stadler]","tblTotalByrSuppliers")

However if i add any fields with no value in it does not like it, could
somebody please give me some advice

Tempy

*** Sent via Developersdex http://www.developersdex.com ***
  #5  
Old November 13th, 2005, 11:42 AM
Ozzone
Guest
 
Posts: n/a
Default Re: Adding up field from a table

Sounds to me like you need to restructure your tables and have a child
table linked to a parent. Then it would be easy to total up without
having to deal with nulls across multiple fields in a DSum.

  #6  
Old November 13th, 2005, 11:42 AM
Tempy
Guest
 
Posts: n/a
Default Re: Adding up field from a table

Hi Ozzone, Excuse the ignorance but i am fairly new at this game, could
you explain ?

Tempy

*** Sent via Developersdex http://www.developersdex.com ***
  #7  
Old November 13th, 2005, 11:42 AM
Tempy
Guest
 
Posts: n/a
Default Re: Adding up field from a table

Sorry i forgot to mention that this table is made from a Query, i do not
know if that makes a difference ?

Tempy

*** Sent via Developersdex http://www.developersdex.com ***
 

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over network members.
Post your question now . . .
It's fast and it's free

Popular Articles