Results 1 to 5 of 5
  1. #1
    Ramesh Kumar C is offline Novice
    Windows 8 Access 2013 64bit
    Join Date
    Aug 2017
    Posts
    5

    iif Function not giving me correct results

    Hi Folks,



    I tried running the Iif Function in access and it is not giving me expected results. Please check the below query I have used.

    IIf([ENTRY AMT]<0,"Negative","Positive")

    Please help me to get correct results...

    Thanks

  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,521
    What is it doing wrong? Is the field text rather than numeric?
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    Ramesh Kumar C is offline Novice
    Windows 8 Access 2013 64bit
    Join Date
    Aug 2017
    Posts
    5
    It is populating "#Error" value instead of "Negative" or "Positive".

    The data type of the filed is Short Text.

  4. #4
    Ramesh Kumar C is offline Novice
    Windows 8 Access 2013 64bit
    Join Date
    Aug 2017
    Posts
    5
    Hi Paul,

    I have changed the data type to "Number". And i have got the expected values. Thanks a lot.

    Ramesh

  5. #5
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    No problem.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

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

Similar Threads

  1. ADODB recordset not giving results I want
    By klnlsu in forum Programming
    Replies: 3
    Last Post: 05-18-2016, 12:15 PM
  2. do until not giving me individual results
    By Ruegen in forum Programming
    Replies: 18
    Last Post: 12-08-2013, 05:03 PM
  3. Search Query not giving all results
    By wrkadri in forum Queries
    Replies: 5
    Last Post: 02-05-2013, 12:37 AM
  4. Calculation in Query giving wrong results
    By dargo72 in forum Queries
    Replies: 11
    Last Post: 11-07-2012, 05:39 AM
  5. Replies: 9
    Last Post: 06-26-2011, 09:14 PM

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