Results 1 to 2 of 2
  1. #1
    New Lounger
    Join Date
    Nov 2004
    Location
    Kitchener, Ontario, Canada
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Query Question (Access 2000)

    Hi, I'm pretty new to access, and I am trying to run a query that gives me differences between two fields in two tables as long as they are greater than $1.

    The last field in my query is where it calculates the difference. This is currently what I have:

    Diff: (nz([tblTradesGS].[Net Proceeds])-nz([tbltradesLuminus].[Net Proceeds]))

    I have criteria set as >1, but I have amounts show up in my query where the difference between the two fields in the two tables is only $.01. I don't want these immaterial amounts to be generated in my query results, but I can't figure out how to get rid of them. Can anyone provide any suggestions?

    Thanks,

  2. #2
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Query Question (Access 2000)

    I'm not sure what you're getting, but if you provide no second argument for Nz, it isn't going to work if either value is null. Try this instead:

    Diff: CLng(nz([tblTradesGS].[Net Proceeds],0)-nz([tbltradesLuminus].[Net Proceeds],0))
    Charlotte

Posting Permissions

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