Results 1 to 8 of 8
  1. #1
    Chadsterman is offline Novice
    Windows 10 Office 365
    Join Date
    Oct 2020
    Posts
    7

    Query: owners with balance greater than

    I am rather new to access, but "I think" I am trying to create an expression that will return owners with a total owner net pay of greater than 100.00. Any help would be greatly appreciated. I have "owners" that have multiple "owner net pay" amounts. Example - Owner - Joe has 15 owner net pay records that total $95.00. Owner - Mary has 12 owner net pay records that total $120.00. I need the expression that will pull in Mary, but not Joe. Additionally, it is not built yet, but if Mary gets paid the $120.00 and a check number field has been populated, then I need the expression to exclude those particular owner net pay amounts when the query is ran the next time.




  2. #2
    CJ_London is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,411
    the description of your requirement is pretty vague and what is missing in particular is your table structure and relationships.

    Best I can suggest is use an aggregate query (group by) to sum the payments and exclude those where the sum of payments>100

  3. #3
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,524
    make query1: qsSumQry , that sums all the Owners,
    Then make Q2:
    select ID, Owner, Amt from qsSumQry where Amt > 100

  4. #4
    Micron is online now Virtually Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,789
    ranman's is the simpler approach for a newbie but requires that you create 2 queries when one ought to be enough. IMO that would be to create a Select query that gives you the fields and records you want, then use the Sigma symbol on the ribbon to convert it to a Totals query. It's likely that you would have to research Access Totals Queries first because I think it would be just luck if you were successful right off the bat. If you don't know how to create a Select query, then you should be looking for tutorials or get a book on the basics because that's Access 101.
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

  5. #5
    isladogs's Avatar
    isladogs is offline MVP / VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jan 2014
    Location
    Somerset, UK
    Posts
    5,974
    Request to mods:
    Can this thread please be moved from the code repository (intended for code samples) to the Queries section of the forum
    Colin, Access MVP, Website, email
    The more I learn, the more I know I don't know. When I don't know, I keep quiet!
    If I don't know that I don't know, I don't know whether to answer

  6. #6
    Chadsterman is offline Novice
    Windows 10 Office 365
    Join Date
    Oct 2020
    Posts
    7
    Thanks for the school of hard knocks. I am on the right track now.

    Isladogs - Yes, it can be moved. My apology. I was toggling between both forums and inadvertently posted here. So sorry.

  7. #7
    pbaldy's Avatar
    pbaldy is online now Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    Quote Originally Posted by isladogs View Post
    Request to mods:
    Can this thread please be moved from the code repository (intended for code samples) to the Queries section of the forum

    Done. thanks for the heads-up.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  8. #8
    isladogs's Avatar
    isladogs is offline MVP / VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jan 2014
    Location
    Somerset, UK
    Posts
    5,974
    Thanks Paul and no problem as far as the OP is concerned.
    Colin, Access MVP, Website, email
    The more I learn, the more I know I don't know. When I don't know, I keep quiet!
    If I don't know that I don't know, I don't know whether to answer

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

Similar Threads

  1. Opening balance worked into running balance.
    By Perfac in forum Programming
    Replies: 11
    Last Post: 01-09-2018, 01:20 PM
  2. Greater Than in Query
    By rplum in forum Queries
    Replies: 7
    Last Post: 04-19-2016, 09:33 AM
  3. Replies: 7
    Last Post: 10-24-2015, 01:45 PM
  4. General Ledger Query With Opening Balance and Running Balance
    By muhammadirfanghori in forum Queries
    Replies: 3
    Last Post: 03-12-2015, 07:17 AM
  5. Greater than query
    By noobaccess in forum Access
    Replies: 5
    Last Post: 12-05-2012, 09:18 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