Results 1 to 4 of 4
  1. #1
    Nixx1401 is offline Competent Performer
    Windows Vista Access 2003
    Join Date
    Feb 2010
    Location
    Barbados
    Posts
    115

    If Statement in Report

    I have a report which is generated from a query. The report displays the individual name and the currency amount that person possess.

    These are the fields: Transaction Number, Transaction Date, Name, ID, Amount Withdrawn, Amount Deposited and the currency is grouped. This formula here calculates the currency balance
    =Sum([curDepositAmt])-Sum([curWithdrawAmt]) but if the withdrawn amount is blank it return no value for the currency balance

    Can someone assist me with the formula. Basically I would like

    If the withdrawn amount is blank display the deposit amount if not subtract the sum of deposits from sum of withdrawals

  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,652
    It sounds like the field is Null, in which case the Nz() function would be the way around it. Try that and see if it works for you (more info in Help if you're unfamiliar with the function).
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    Nixx1401 is offline Competent Performer
    Windows Vista Access 2003
    Join Date
    Feb 2010
    Location
    Barbados
    Posts
    115
    Can you elaborate a little more dont quite know how write the statement.

  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,652
    I mentioned looking in help because that should always be your first stop. There's a lot more information there.
    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. IIf Statement...HELP!
    By bdhFS in forum Queries
    Replies: 5
    Last Post: 05-19-2010, 07:55 AM
  2. If statement Issue????
    By graviz in forum Programming
    Replies: 1
    Last Post: 09-25-2009, 10:09 AM
  3. IIF statement
    By james1982 in forum Access
    Replies: 1
    Last Post: 07-20-2009, 09:38 AM
  4. how to use IF then statement
    By ronnie4 in forum Access
    Replies: 1
    Last Post: 03-17-2009, 11:32 PM
  5. IF Statement with Minutes
    By sal_gxer in forum Queries
    Replies: 0
    Last Post: 02-12-2007, 08:39 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