Results 1 to 6 of 6

Query Sorting

  1. #1
    Snickren is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jan 2016
    Posts
    10

    Query Sorting


    I have a donation database and built a query and report to do what I need it to do but now that I'm getting a couple years information built in I need it to filter out the duplicate donor's entries. How do I ensure I'm removing the duplicate donor but I would like to keep the most current year's information? I can't make it filter by just the year because I want a complete list of donors weather they have given or not.

  2. #2
    aytee111 is online now Competent At Times
    Windows 7 32bit Access 2013 32bit
    Join Date
    Nov 2011
    Location
    Nomad
    Posts
    1,672
    What are you trying to show, just the latest entry per donor? Create a pre-query, one that contains just the donor and the date(s) you want. Then bring that query in to the one you are using to narrow down your results.

  3. #3
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    4,331
    Make a query, qsDonors, that pulls all donor names and IDs. Set the property UNIQUE VALUES= ttrue.
    make another query, qsDonations1Year, add the data table, and the qsDonors query.
    join the 2 on DonorID,
    dbl-click the join line.
    set propert to OUTER join,
    Set All recs in qsDonors, some recs in Data,
    bring Down fields: qsDonor.Name,tData.Amt
    bring down tData.Date field,and set the criteria to a date range.
    save query as qsDonations1Yr

    run query.

  4. #4
    Snickren is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jan 2016
    Posts
    10
    Well, it's not letting me attach the photos I wanted to but when I do this it is giving me the year I wanted but it seems that it's almost duplicating the 2016's and then it isn't including the 2015's that aren't a duplicate of 2016. Hope that makes sense. Did I miss something or do it incorrectly?

  5. #5
    Snickren is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jan 2016
    Posts
    10
    Well, it's not letting me attach the photos I wanted to but when I do this it is giving me the year I wanted but it seems that it's almost duplicating the 2016's and then it isn't including the 2015's that aren't a duplicate of 2016. Hope that makes sense. Did I miss something or do it incorrectly?

  6. #6
    aytee111 is online now Competent At Times
    Windows 7 32bit Access 2013 32bit
    Join Date
    Nov 2011
    Location
    Nomad
    Posts
    1,672
    Not sure where photos have come in to the picture now. Did you follow the instructions and get the queries working?

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

Similar Threads

  1. Query Sorting
    By BringTheR41n in forum Queries
    Replies: 3
    Last Post: 07-11-2014, 09:48 AM
  2. Sorting in Totals Query
    By Bertrand82 in forum Queries
    Replies: 1
    Last Post: 11-26-2012, 06:17 AM
  3. Sorting in Query
    By Rhubie in forum Access
    Replies: 11
    Last Post: 09-21-2012, 04:49 PM
  4. Replies: 11
    Last Post: 01-12-2012, 06:55 PM
  5. Sorting in a Query (Dates)
    By JohnS in forum Queries
    Replies: 2
    Last Post: 10-23-2009, 02:51 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
  •  
Tech Forums: Microsoft Office Forums