ARRAY(0x5d5dcb8)
Sum IF in Access
Hello Guest
  
  • Login
• Register…
• Start blog
  • Who, Where, When
• What is interesting here?
• Duels
  • Polls
• Avatars
• Interests
  • Cities and Countries
• Random blog
• Users search
  • Search
• Games
• Tests
• QAIX
  • Сообщества
• Talxy Chat
• Horoscope
• Online
 
Register!

QAIX > MS Access database development > Sum IF in Access 4 September 2008 11:47:18

  Top users: 
  Recent blog posts: 
  Forums:   
  Discuss: 
  Recent forum topics: 
  Recent forum comments:
  Модератор:

Sum IF in Access

Tee GEE 8 August 2006 23:02:04
 Is there a SumIF function in Access? I have to SUM a duration of time,
but only if a logical Yes/No check box is TRUE. I am working with the
expression builder and a Text Box. Thanks for the help.

Forgive me...I'm a beginner programmer with expert expectations.

*** Sent via Developersdex http://www.develope­rsdex.com ***
Add comment
Guest 8 August 2006 23:14:22 permanent link ]
 Hi -
You need to nest your IF and SUM functions, like so:
IF(y/n field=y,SUM(value1,­value2)null)
This means if y/n criteria is true, the sum of value1 and value2
appears, if not then a null (blank) value appears.
Eddie

Tee GEE wrote:> Is there a SumIF function in Access? I have to SUM a duration of time,> but only if a logical Yes/No check box is TRUE. I am working with the> expression builder and a Text Box. Thanks for the help.>
Forgive me...I'm a beginner programmer with expert expectations.>
*** Sent via Developersdex http://www.develope­rsdex.com ***

Add comment
Gumby 8 August 2006 23:24:56 permanent link ]
 =Sum(IIf([OK]=True,[Date],0))

This is going to Sum the data. If you want to sum the duration such as
from 8am to 4pm then you might look at the TimeValue function.


Returns one of two parts, depending on the evaluation of an expression.

Syntax

IIf(expr, truepart, falsepart)

The IIf function syntax has these named arguments:

Part Description
expr Required. Expression you want to evaluate.
truepart Required. Value or expression returned if expr is True.
falsepart Required. Value or expression returned if expr is False.



Remarks

IIf always evaluates both truepart and falsepart, even though it
returns only one of them. Because of this, you should watch for
undesirable side effects. For example, if evaluating falsepart results
in a division by zero error, an error occurs even if expr is True.



Tee GEE wrote:> Is there a SumIF function in Access? I have to SUM a duration of time,> but only if a logical Yes/No check box is TRUE. I am working with the> expression builder and a Text Box. Thanks for the help.>
Forgive me...I'm a beginner programmer with expert expectations.>
*** Sent via Developersdex http://www.develope­rsdex.com ***

Add comment
Gumby 8 August 2006 23:26:25 permanent link ]
 =Sum(IIf([Your logical yes/no field]=True,[Your duration of time
field],0))

This is going to Sum the data. If you want to sum the duration such as
from 8am to 4pm then you might look at the TimeValue function.


Returns one of two parts, depending on the evaluation of an expression.



Syntax


IIf(expr, truepart, falsepart)


The IIf function syntax has these named arguments:


Part Description
expr Required. Expression you want to evaluate.
truepart Required. Value or expression returned if expr is True.
falsepart Required. Value or expression returned if expr is False.


Remarks


IIf always evaluates both truepart and falsepart, even though it
returns only one of them. Because of this, you should watch for
undesirable side effects. For example, if evaluating falsepart results
in a division by zero error, an error occurs even if expr is True.


Tee GEE wrote:> Is there a SumIF function in Access? I have to SUM a duration of time,> but only if a logical Yes/No check box is TRUE. I am working with the> expression builder and a Text Box. Thanks for the help.>
Forgive me...I'm a beginner programmer with expert expectations.>
*** Sent via Developersdex http://www.develope­rsdex.com ***

Add comment
Chris.Nebinger@Gmail.Com 9 August 2006 02:28:20 permanent link ]
 And, another way would be to use the DSUM function:

Dsum("[Timefield]","TableName"­,"CheckField=True")


Chris Nebinger


Tee GEE wrote:> Is there a SumIF function in Access? I have to SUM a duration of time,> but only if a logical Yes/No check box is TRUE. I am working with the> expression builder and a Text Box. Thanks for the help.>
Forgive me...I'm a beginner programmer with expert expectations.>
*** Sent via Developersdex http://www.develope­rsdex.com ***

Add comment
smartboys52000 4 September 2008 11:47:18 permanent link ]
 Users Elango Vasanth G.Karthi Total

CPW BKD 0 224
Booking 10 01313
IND SHIP #REF! 10 #REF! #REF! This field i need to sum formula -- =SUM(B26:d29)


my email id smartboys52000@yaho­o.co.in
Add comment
 

Add new comment

As:
Login:  Password:  
 
 
  
 
Пожалуйста, относитесь к собеседникам уважительно, не используйте нецензурные слова, не злоупотребляйте заглавными буквами, не публикуйте рекламу и объявления о купле/продаже, а также материалы нарушающие сетевой этикет или законы РФ. Ваш ip-адрес записывается.


QAIX > MS Access database development > Sum IF in Access 4 September 2008 11:47:18

see also:
RE: CC Processing Fees?
Conspiracy theory
I donated my hair
pass tests:
Do you really know yourself?
see also:
hp compatible toner cartridge Q2612A
Which color OPC drum we will use?
What is OPC drum?-Conditioning

  Copyright © 2001—2010 QAIX
Идея: Монашёв Михаил.
Авторами текстов, изображений и видео, размещённых на этой странице, являются пользователи сайта.
See Help and FAQ in the community support.qaix.com.
Write in the community about the bugs you have noticedbugs.qaix.com.
Write your offers and comments in the communities suggest.qaix.com.
Information for parents.
Пишите нам на .
If you would like to report an abuse of our service, such as a spam message, please .
Если Вы хотите пожаловаться на содержимое этой страницы, пожалуйста .