Results 1 to 4 of 4
  1. #1
    Aliasjeffturner is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Apr 2017
    Posts
    2

    Question Crosstab query showing duplicate rows

    Design View http://imgur.com/a/OitgN




    Datasheet http://imgur.com/a/8bp9z


    I want to provide a list of account numbers and see if those accounts have the RPSs (Restricted Product Set, essentially 1 of 400+ codes) I have listed in the criteria, 1, 142, 260, 280, 318, 373, 374, 376, 401.


    I want the query to return a column for each account number i provide (in an excel linked table) and 9 rows, 1 for each RPS I have listed. I thought this was the point of a cross tab query, to be able to quickly evaluate data. If all the counts were in the same 9 rows, i could quickly see if an account is missing one of these RPSs. Instead, the query is returning 9 rows for EACH account number, which is no more helpful than if i just created a select query.


    What am i doing wrong? This is my first attempt at a crosstab query. Thanks in advance for your help.

  2. #2
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,525
    The main query should run with no duplicated.
    then the Crosstab query is based off that query.

  3. #3
    Aliasjeffturner is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Apr 2017
    Posts
    2
    I see... Well if i created a select query with the criteria of account number and RPS, it would bring back each RPS for each account. For example, if every account has RPS 1, there would be 5 entries for RPS 1. So since i have selected RPS as my row heading, I will get 5 rows for RPS 1?

    Do you know any way to tweak the criteria to only have 1 row for each RPS, and then multiple 1s going across denoting each column/account that has that RPS? Would it change if i swapped the rows and columns? or is there something else i could use for the "value"?

    EDIT: I'm looking for something like this: http://imgur.com/a/YkRfq
    Last edited by Aliasjeffturner; 04-17-2017 at 04:23 PM. Reason: Provide example

  4. #4
    aytee111 is offline Competent At Times
    Windows 10 Access 2013 64bit
    Join Date
    Nov 2011
    Location
    Nomad
    Posts
    3,936
    The first query will show all the data you want to display. The crosstab query which runs off that will show one line for each row heading.

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

Similar Threads

  1. Crosstab Query Showing Null Values
    By equestrian in forum Queries
    Replies: 2
    Last Post: 09-22-2015, 03:24 AM
  2. Showing Columns & Rows in Crosstab query
    By coach32 in forum Queries
    Replies: 6
    Last Post: 09-11-2011, 07:01 PM
  3. '.' showing as '_' in crosstab query
    By AndyK in forum Queries
    Replies: 3
    Last Post: 04-13-2011, 10:41 AM
  4. Replies: 1
    Last Post: 01-24-2011, 03:03 PM
  5. Replies: 7
    Last Post: 09-24-2010, 07:23 AM

Tags for this Thread

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