Page 1 of 2 12 LastLast
Results 1 to 15 of 26
  1. #1
    dante2004 is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Apr 2016
    Posts
    21

    Two tables, one query...remove duplicate data in report?

    I have 2 tables, each listing inventory at their respective warehouse. I've combined the tables in a query and filtered according to me needs.

    However, when I create the report, I am getting duplicate data that is misleading. I know this is probably an easy fix...just don't know where to start.

    There is only "1" item in storage bin "10459413" so I don't want it repeated 4 times. However, I do want all four records from the far right column.

    Click image for larger version. 

Name:	example.GIF 
Views:	14 
Size:	30.6 KB 
ID:	27209

    I would like it to show up like "example2" with the items with the red line through them not showing up


    Click image for larger version. 

Name:	example2.GIF 
Views:	14 
Size:	31.1 KB 
ID:	27210


    The 2nd and 3rd columns are the quantity on hand and bin location in warehouse #1 (whse 1) and the 3rd and 4th columns are the same information for warehouse #2 (whse 2).
    Click image for larger version. 

Name:	example3.GIF 
Views:	14 
Size:	33.4 KB 
ID:	27211

    Total inventory
    Whse 1 = 1
    Whse 2 = 8

  2. #2
    dante2004 is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Apr 2016
    Posts
    21
    I guess I really should have put this in the queries section...because I think that is where the "issue" starts. Here is a screenshot of the query that the report is based on.
    Click image for larger version. 

Name:	example4.GIF 
Views:	14 
Size:	24.8 KB 
ID:	27212

  3. #3
    dante2004 is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Apr 2016
    Posts
    21
    And then from design view...sorry for all the posts. Couldn't figure out how to get the second image in the old post and then delete the additional posts.
    Click image for larger version. 

Name:	example5.GIF 
Views:	14 
Size:	73.7 KB 
ID:	27213

  4. #4
    andy49's Avatar
    andy49 is offline VIP
    Windows 10 Access 2007
    Join Date
    Nov 2016
    Location
    London
    Posts
    1,051
    You could use the query designer to get the top 1 results? Would that suffice?


    Sent from my iPhone using Tapatalk

  5. #5
    dante2004 is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Apr 2016
    Posts
    21
    I'm not sure if that would do it...I'll look into that. I have over 10,000 part numbers to do this for so I'm hoping I can find a way to speed this up from manual comparisons in Excel. :-)

  6. #6
    andy49's Avatar
    andy49 is offline VIP
    Windows 10 Access 2007
    Join Date
    Nov 2016
    Location
    London
    Posts
    1,051
    In which case we may need more info. What is it that is so special about that top result that you want it and no other?


    Sent from my iPhone using Tapatalk

  7. #7
    dante2004 is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Apr 2016
    Posts
    21
    Unless I am using it wrong, "Top Values = 1" reduces the record count of BOTH columns to just 1. I want all 4 records from the "Location" column.

  8. #8
    dante2004 is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Apr 2016
    Posts
    21
    I don't want just the "top result". I want them all. The problem is, that in the examples (images), it is the same data point repeated. It makes it look like I have 12 pieces of that material when I actually have 9.

  9. #9
    orange's Avatar
    orange is online now Moderator
    Windows 10 Access 2010 32bit
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,722
    What exactly are you trying to achieve - in simple terms, no jargon?
    I have 2 tables, each listing inventory at their respective warehouse.
    Please show us your table designs and relationships.

  10. #10
    dante2004 is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Apr 2016
    Posts
    21
    Let me redefine my objective in different terms and maybe it will allow me to better communicate my objective. I want to learn how to do this, not just "fix this".

    Let's say you are going grocery shopping and you are making a list of what you need. So first, do you an inventory of what you have (I know...crazy analogy...who does that?!? lol)


    I have this list of food items
    Click image for larger version. 

Name:	Capture.GIF 
Views:	14 
Size:	3.3 KB 
ID:	27215

    I also have this list of items
    Click image for larger version. 

Name:	Capture2.GIF 
Views:	13 
Size:	4.6 KB 
ID:	27216

    I want to combine it into a list like this
    Click image for larger version. 

Name:	Capture3.GIF 
Views:	13 
Size:	6.0 KB 
ID:	27217

    But I'm getting a list like this
    Click image for larger version. 

Name:	Capture4.GIF 
Views:	13 
Size:	7.9 KB 
ID:	27218

    What I have circled in red is what I don't want. In this case, it is showing me I have much more beer than I really have. That would be great (haha), but I don't have that much beer. Imagine planning a party and your guest being disappointed when you run out. (joke)


    Hope that makes more sense.

  11. #11
    andy49's Avatar
    andy49 is offline VIP
    Windows 10 Access 2007
    Join Date
    Nov 2016
    Location
    London
    Posts
    1,051
    Click image for larger version. 

Name:	test.jpg 
Views:	12 
Size:	34.5 KB 
ID:	27220


    Any use?

    It's a union query and a crosstab query

  12. #12
    dante2004 is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Apr 2016
    Posts
    21
    In theory that works, but the problem is we have almost 1000 locations (thing large manufacturing warehouse). So we would have columns going to the right forever...

    I'm going to restructure the table and see if that works...

  13. #13
    dante2004 is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Apr 2016
    Posts
    21
    Okay...my idea with the tables adding a WHSE # didn't work either...

  14. #14
    aytee111 is offline Competent At Times
    Windows 10 Access 2013 64bit
    Join Date
    Nov 2011
    Location
    Nomad
    Posts
    3,936
    There is a property called "Hide Duplicates", set this to Yes for Stock and Location

  15. #15
    dante2004 is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Apr 2016
    Posts
    21
    Quote Originally Posted by aytee111 View Post
    There is a property called "Hide Duplicates", set this to Yes for Stock and Location
    I tried that...and this is what I get...

    If I hide duplicates for "storage bin" I get this

    Click image for larger version. 

Name:	Capture10.GIF 
Views:	12 
Size:	64.6 KB 
ID:	27239

    This is what my query looks like that feeds the report

    Click image for larger version. 

Name:	Capture11.GIF 
Views:	12 
Size:	25.4 KB 
ID:	27240

    Query design

    Click image for larger version. 

Name:	Capture12.GIF 
Views:	12 
Size:	68.8 KB 
ID:	27241


    If I hide duplicates for "stock" and "location"
    Click image for larger version. 

Name:	Capture13.GIF 
Views:	12 
Size:	25.7 KB 
ID:	27242

    Click image for larger version. 

Name:	Capture14.GIF 
Views:	12 
Size:	30.4 KB 
ID:	27243

Page 1 of 2 12 LastLast
Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 2
    Last Post: 10-16-2015, 10:15 PM
  2. Replies: 1
    Last Post: 03-10-2015, 11:47 AM
  3. Remove Duplicate Entries in Query Design
    By samanthaM in forum Access
    Replies: 1
    Last Post: 10-27-2013, 11:26 AM
  4. Replies: 27
    Last Post: 08-14-2012, 09:05 AM
  5. Replies: 1
    Last Post: 04-30-2012, 08:42 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