Results 1 to 6 of 6
  1. #1
    Snickren is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jan 2016
    Posts
    24

    couple of query questions

    A couple of questions:


    I have a series of queries that I created to get to the outcome I would like. The last query I created has the amount of records that I'm needing for a report. Now I need to add additional data to those records. Once I created the newest query and ran it, the number of records changed again. It doesn't work to change if it is a right or left join either. How do I get it to keep all of the records without removing the ones that don't have any and just add the additional data for those records even if there is no data for them? The previous query I did had all of this.
    Overall I took a query of all of our businesses that have donated and created one query of the last year that they donated, they are still on the list if they haven't donated. I just need the latest details if they have.

    What is the best way to join two queries with the same fields?
    Business data (from above) plus all other donors in the database (with information from the latest year they donated)

  2. #2
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,524
    since we cant see the query, we cant really know.
    If you join tBusiness to tDonation on BusID, (inner join) ,then ONLY those who donated will show.

  3. #3
    Snickren is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jan 2016
    Posts
    24
    Quote Originally Posted by ranman256 View Post
    since we cant see the query, we cant really know.
    If you join tBusiness to tDonation on BusID, (inner join) ,then ONLY those who donated will show.
    I'll try to start from the bottom.

    I have data for 2 years in my database now. For this report I need all businesses whether they have given or not and all donors from the last two years but only latest record for each.

    Query 1- All donors minus businesses.
    Query 2- Query 1 & the year, grouped by donor and took Max for the year.
    Query 3- Query 2 & the additional information needed: Joined using donor and year.
    This obtained all of the information that I needed to get solicitation letters for the donors.

    Query 4- All businesses (409 records)
    Query 5- Query 4 & the year, grouped by donor and took Max for the year. (341 records)
    Query 6- Query 5 & Query 4, joined on donor name. (this got me back to the 409 records)
    Query 7- Query 2 & the additional information needed: Joined using donor and year. (343 records, removed all the businesses that haven't given before)

  4. #4
    aytee111 is offline Competent At Times
    Windows 10 Access 2013 64bit
    Join Date
    Nov 2011
    Location
    Nomad
    Posts
    3,936
    Is this still an issue?

    I don't understand how you get from query4 to query 5. Where does the donor come from, how are the businesses and donors linked?

  5. #5
    aytee111 is offline Competent At Times
    Windows 10 Access 2013 64bit
    Join Date
    Nov 2011
    Location
    Nomad
    Posts
    3,936
    Query 1 - include all donors and businesses who have given.
    Query 4 - all business that have not given

  6. #6
    Snickren is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jan 2016
    Posts
    24
    Quote Originally Posted by aytee111 View Post
    Query 1 - include all donors and businesses who have given.
    Query 4 - all business that have not given
    Thank you for all of your help!

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

Similar Threads

  1. A couple of neat games in MSAccess
    By pkstormy in forum Sample Databases
    Replies: 2
    Last Post: 02-04-2014, 01:08 AM
  2. Couple of Questions
    By cade1980 in forum Access
    Replies: 2
    Last Post: 04-15-2012, 12:00 PM
  3. Couple Design Issues
    By dpasanen in forum Forms
    Replies: 4
    Last Post: 03-29-2012, 07:47 AM
  4. Couple of newbie questions
    By Awowk in forum Access
    Replies: 12
    Last Post: 08-06-2010, 01:16 PM
  5. A couple of problems...
    By dr_destructo in forum Forms
    Replies: 1
    Last Post: 06-08-2010, 11:03 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