Results 1 to 3 of 3
  1. #1
    mulefeathers is offline Advanced Beginner
    Windows XP Access 2003
    Join Date
    Oct 2009
    Posts
    39

    Need Help with Queries

    I have a database that is used to track missing parts. I have created a UNION query that returns 217 records from 3 other queries. Pretty straight forward no problems here.



    Select [Part Number], Shortage, Comment
    from qryShortage1
    UNION ALL
    Select [Part Number], Shortage, Comment
    from qryShortage2
    UNION ALL Select [Part Number], Shortage, Comment
    from qryShortage3;

    I have a master table that contains all information that is being used in the next query. I created a simple design query that using the above union query and the master table.

    Now the problem is that when the new query is run the results contain several duplicated records.

    For example: part VA350C1 is listed as to have 4 separate times each separate order missing the same thing. Order #1 for 80 pcs order 2 for 34 pcs order 3 for 40 pcs and order 4 for 40 pieces.

    [IMG]http://www.msoutdoors.com/access1.JPG[/IMG]

    This should only return the item once for each listing and the dollar amounts. It is adding 3 additional entries for each time it shows up.

    This is probably something simple I am over looking but if anyone has any ideas as to why the data is coming back this way I would appreciate any help you can offer.

  2. #2
    kimmer is offline Competent Performer
    Windows 7 Access 2010 (version 14.0)
    Join Date
    May 2010
    Posts
    100
    I don't understand your query or why it takes a union query, so if this doesn't work, don't be too surprised. But try this: go to the Property sheet for the query and set the Unique Values property to Yes.

  3. #3
    mulefeathers is offline Advanced Beginner
    Windows XP Access 2003
    Join Date
    Oct 2009
    Posts
    39
    Thank you for the response. I believe I have corrected the problem by joining two other fields between the table and the query.

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

Similar Threads

  1. Queries
    By MeganDoak in forum Queries
    Replies: 3
    Last Post: 04-22-2010, 12:13 AM
  2. how i can run a sum queries
    By ahmed-aljawad in forum Queries
    Replies: 3
    Last Post: 04-17-2010, 11:06 AM
  3. Combine queries
    By thart21 in forum Queries
    Replies: 1
    Last Post: 03-05-2010, 01:39 PM
  4. Replies: 5
    Last Post: 02-08-2010, 06:12 PM
  5. need help with queries
    By gromit95 in forum Queries
    Replies: 1
    Last Post: 02-06-2009, 06:50 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