Results 1 to 3 of 3
  1. #1
    bmschaeffer is offline Novice
    Windows XP Access 2003
    Join Date
    Aug 2011
    Posts
    24

    Collapsing Duplicates to 1 Row??

    I am new to access and having some trouble with a report. I believe the problem starts with my query. I have a database that has vendors in one column, posting period in another, and the amount in last column. I want to create a monthly trending report that will show the YTD expenses by vendor, but I need to create a report so it looks professional when given to a manager. I have a query in which the is a SUMIF column for each month. SUMIF posting period 1 for January, 2 for Feb and so on. But the report lists the same vendor multiple times because the expense is in different months. Is there anyway to collapse the duplicate vendors to 1 row?

    Right now my report looks like this:


    Vendor Jan Feb Mar Apr
    XXX X
    XXX X
    XXX X

    I want it to look like this:
    Vendor Jan Feb Mar Apr
    XXX X X X

  2. #2
    apr pillai's Avatar
    apr pillai is offline Competent Performer
    Windows 7 64bit Access 2007
    Join Date
    May 2010
    Location
    Alappuzha, India
    Posts
    209
    You can use a Cross-Tab Query to solve the issue.

    Define Vendor as Row Heading.
    Format([Posting Period],"mmm") as Column Heading.
    Expenses as Value, use SUM to create summary.


    Code:
    TRANSFORM Sum(Table1.Expenses) AS SumOfExpenses
    SELECT Table1.Vendor
    FROM Table1
    GROUP BY Table1.Vendor
    PIVOT Format([Posting Period],"mmm ");

  3. #3
    bmschaeffer is offline Novice
    Windows XP Access 2003
    Join Date
    Aug 2011
    Posts
    24
    I have used cross tabs before, but is there a way to turn the cross tab query into a neat report. I have to present this data to high level managers that do not want to see pivots tables or cross tab queries. I have a great report design for individual months, but when it comes to getting a YTD trend I am having issues.

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

Similar Threads

  1. help with Duplicates
    By keat63 in forum Queries
    Replies: 4
    Last Post: 09-01-2011, 07:51 AM
  2. Limiting Duplicates
    By Zerdan in forum Forms
    Replies: 4
    Last Post: 06-07-2011, 09:29 AM
  3. keep getting duplicates
    By MichaelMic in forum Queries
    Replies: 3
    Last Post: 05-15-2011, 10:37 PM
  4. Getting rid of duplicates
    By anemoskkk in forum Access
    Replies: 1
    Last Post: 04-17-2011, 11:24 AM
  5. duplicates
    By Roberta in forum Queries
    Replies: 5
    Last Post: 09-10-2010, 07:31 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