Results 1 to 4 of 4
  1. #1
    New Lounger
    Join Date
    Nov 2007
    Posts
    22
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Susbraction in query (Access 2000)

    I have a calculated field in my query where one sum is substracted from another.However when there is nothing in the second case the result is also nothing, while i want to preserve the first value
    my expression in the query is : receipts: [prescribed]-[approved].If nothing approved the result should be prescribed and not noting

  2. #2
    Platinum Lounger
    Join Date
    Dec 2001
    Location
    Melbourne, Australia
    Posts
    4,594
    Thanks
    0
    Thanked 27 Times in 27 Posts

    Re: Susbraction in query (Access 2000)

    try:
    receipts: [prescribed]-Nz([approved].,0)

  3. #3
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Susbraction in query (Access 2000)

    I think it should be

    receipts: [prescribed]-Nz([approved],0)

  4. #4
    Platinum Lounger
    Join Date
    Dec 2001
    Location
    Melbourne, Australia
    Posts
    4,594
    Thanks
    0
    Thanked 27 Times in 27 Posts

    Re: Susbraction in query (Access 2000)

    Eagle eyes, well done!!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •