Results 1 to 5 of 5
  1. #1
    cfobare79 is offline Advanced Beginner
    Windows 7 64bit Access 2013
    Join Date
    Dec 2014
    Posts
    66

    IIF Formula issue

    I'm trying to write a formula that references a text box [ServiceName] so that if it equals Office & Mobile Employees that it will then reference text box [SumOfQuantity] and multiply it by .104. If the wording in text box [ServiceName does not match I want it to return 0. Below is the fromule I was trying to make work but it's not accepting it.



    IIF (([ServiceName] = "Office & Mobile Employees"), ([SumOfQuantity] * (.104), 0)

    Every time I try to save it, it is changed to [IIF ((ServiceName] = "Office & Mobile Employees"), ([SumOfQuantity * (].[104), 0)]. Please help

  2. #2
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,642
    You've got an extra parentheses in there. Try

    IIF ([ServiceName] = "Office & Mobile Employees", [SumOfQuantity] * .104, 0)
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    cfobare79 is offline Advanced Beginner
    Windows 7 64bit Access 2013
    Join Date
    Dec 2014
    Posts
    66
    For some reason when I save the Report it changes the formula to this [IIF (ServiceName] = "Office & Mobile Employees", [SumOfQuantity * ].[104, 0)]

  4. #4
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,642
    In a textbox you'd need an = at the beginning.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  5. #5
    cfobare79 is offline Advanced Beginner
    Windows 7 64bit Access 2013
    Join Date
    Dec 2014
    Posts
    66
    lol.... much better... its the simple things

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 41
    Last Post: 05-29-2015, 02:58 PM
  2. Replies: 5
    Last Post: 01-08-2015, 02:08 PM
  3. CDate and CStr issue with "Invalid Use of Null" Issue
    By excellenthelp in forum Queries
    Replies: 3
    Last Post: 07-25-2014, 01:34 PM
  4. Replies: 22
    Last Post: 05-21-2013, 07:54 PM
  5. SQL Formula to Sum Itself
    By Scorpio11 in forum Access
    Replies: 1
    Last Post: 02-19-2011, 11:22 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums