Results 1 to 3 of 3
  1. #1
    noretoc is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jan 2012
    Posts
    18

    Query not pulling all records

    Can anyone take a look and see if you can help a poor newbie out. I have several queries which are used to calculate totals that are based off of several tables. One of the queries however is not pulling all the records from all the tables and I am not sure why. The query name is totals, and It looks to me like the relationship structure is intact. Anyone willing to take a look, the help would be apprcieated, as well as any pointers.

  2. #2
    pdebaets is offline Competent Performer
    Windows Vista Access 2010 (version 14.0)
    Join Date
    Jul 2010
    Location
    Los Angeles
    Posts
    235
    Open the query in design view and double-click on each of the relationships (the line joining two of the tables). Choose "Select all records from 'Settlement'...".

  3. #3
    noretoc is offline Novice
    Windows XP Access 2007
    Join Date
    Jan 2012
    Posts
    18
    Worked perfectly! Thank you. (Knew it was something simple.).

    Here is another one that has been bugging me.
    My main table is Settlements. It list city properties. There are two fields called qualities and disadvantages. Each of these allow multiple entries based on other tables (named the same as the field). I have a query grabs all the values in these fields, refers to the table they are pulling from, grabs other values relating to the ones pulled and totals them. It is tough to explaine, so looking at the DB will help. (An example: fom the settlement table you could choose "poor" and "large" in the disadvantage field. On the corresponding disadvantage table, poor and large are each thier own record, and they have other field listed with them, An example is crime. Poor has a crime of 2 and large has a crime of one. The query will take the settlement name, see it has poor and large and total the crime value up, giving the city a crime value of 3.)

    The issue is when one of the cities has no disadvantages, or qualities, the query lists the the city, but with blank entries for the totals, rather than zeroes. (In the example above, id I have not chosen any disadvantages for the city, the crime total is blank, but should be 0, because another query will need to add to that later)

    This prevent another query from using total later on as instead of showing zero, then show blank. I got around it for now, by adding a None value to each of the tables (Qualities and disadvantages) that list all the coreponding values as 0, but I would like to find a way to remove that.

    Hopefully looking at the DB will help this make sense as it is very hard to explain. Thanks again for any help.

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

Similar Threads

  1. Query having trouble pulling last record
    By robsworld78 in forum Queries
    Replies: 25
    Last Post: 12-18-2011, 08:32 PM
  2. Have 3 tables - problem with pulling data for query
    By wulfhund in forum Database Design
    Replies: 2
    Last Post: 08-13-2010, 05:38 AM
  3. Query not pulling at all
    By ricardo9211 in forum Queries
    Replies: 3
    Last Post: 02-20-2010, 04:13 AM
  4. Pulling a Query from a List Box
    By Nosaj08 in forum Queries
    Replies: 1
    Last Post: 11-09-2009, 10:27 AM
  5. Does it Matter? Pulling fields in a query
    By Canadiangal in forum Access
    Replies: 1
    Last Post: 10-01-2009, 01:53 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
  •  
Other Forums: Microsoft Office Forums