Wrox Programmer Forums
| Search | Today's Posts | Mark Forums Read
Access Discussion of Microsoft Access database design and programming. See also the forums for Access ASP and Access VBA.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old July 2nd, 2008, 10:59 AM
Registered User
 
Join Date: Jul 2008
Location: Forney, Tx, USA.
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Default Formulas

I need some help as I am working on an incentive database. The problem I am having is how to do the formulas.



In excel spreadsheet it would be this

=if((e8>=10),E8*15,0).



This is what I have in Access (in a query)

New Account Production:iif(( [TotalNewAccts]>=10[TotalNewAccts] *15,0)



Is this correct? I need help???




 
Old July 2nd, 2008, 11:29 AM
Friend of Wrox
Points: 9,611, Level: 42
Points: 9,611, Level: 42 Points: 9,611, Level: 42 Points: 9,611, Level: 42
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Mar 2004
Location: Washington, DC, USA.
Posts: 3,069
Thanks: 0
Thanked 10 Times in 10 Posts
Default

Is this working for you? You are missing a comma, though:

New Account Production:iif(( [TotalNewAccts]>=10,[TotalNewAccts] *15,0)

Did you get an error when you typed in the formula?

mmcdonal

Look it up at: http://wrox.books24x7.com
 
Old July 2nd, 2008, 12:03 PM
Registered User
 
Join Date: Jul 2008
Location: Forney, Tx, USA.
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Default

No, its not working for me. Here is the first error.

The expression you entered contains invalid syntax
You may have entered an operand without an operator.

error with the comma.

The expression you entered is missing a closing parenthesis, bracket ( ] ) , or vertical bar ( I )


 
Old July 2nd, 2008, 01:51 PM
Friend of Wrox
Points: 9,611, Level: 42
Points: 9,611, Level: 42 Points: 9,611, Level: 42 Points: 9,611, Level: 42
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Mar 2004
Location: Washington, DC, USA.
Posts: 3,069
Thanks: 0
Thanked 10 Times in 10 Posts
Default

How about:

New Account Production:iif([TotalNewAccts]>=10,([TotalNewAccts] *15),0)



mmcdonal

Look it up at: http://wrox.books24x7.com
 
Old July 2nd, 2008, 02:04 PM
Registered User
 
Join Date: Jul 2008
Location: Forney, Tx, USA.
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thank you





Similar Threads
Thread Thread Starter Forum Replies Last Post
Formulas work in preview not online andiadmin Infopath 0 April 16th, 2007 12:01 PM
Need help with time formulas pfreire727 Excel VBA 1 February 12th, 2006 07:41 PM
Formulas Change When Macro Runs maaron Excel VBA 2 June 20th, 2005 05:09 AM
Inputbox and Formulas bahachin Excel VBA 3 February 17th, 2005 01:39 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.