Results 1 to 2 of 2
  1. #1
    afeef is offline Novice
    Windows 8 Access 2013 64bit
    Join Date
    Mar 2017
    Posts
    1

    Lightbulb How I get right value by multiple iif function

    I have query field named SBDR. in this field I have written a formula same as
    Code:
    IIf(Left([CATEGORY],6)="SAVING",1 And IIf([DrAMOUNT]>0,1,0))
    . For true value it returning -1and for false blank but i need 1. Another problem is I have more field like SBDR. such as SBCR, CDDR, CDCR. when I use [SBDR]+[SBCR]+[CDDR]+[CDCR] formula in another field , it returns blank value.



    What can I do now?

    note: DrAmount is Number field

  2. #2
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,550
    any field that is null will result in null (in any math op)
    so convert if they may be null

    NZ([SBDR])+NZ([SBCR])+NZ([CDDR])+NZ([CDCR])

    and you prob. want: IIf(Left([CATEGORY],6)="SAVING", IIf(NZ([DrAMOUNT])>0,1,0),0)

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

Similar Threads

  1. DLOOKUP Function for Multiple Criteria.
    By cap.zadi in forum Forms
    Replies: 9
    Last Post: 05-31-2017, 05:01 PM
  2. Replies: 11
    Last Post: 03-02-2017, 12:52 PM
  3. Multiple fields in a function
    By sanderson in forum Programming
    Replies: 4
    Last Post: 09-09-2015, 08:37 AM
  4. Replies: 3
    Last Post: 08-31-2015, 09:04 AM
  5. Replies: 15
    Last Post: 07-09-2015, 01:39 AM

Tags for this Thread

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