Results 1 to 3 of 3
  1. #1
    exbaitman is offline Novice
    Windows 8 Access 2013
    Join Date
    Mar 2015
    Posts
    4

    Need help Designing Form

    OK I have sales data entered in a DB like this. Each [] is a column.



    [Saleman][Customer][Product Type][Month][Year][[Sales amount]

    Our company reports sales monthly to see how people are doing. The sales figures are entered in the [Sales Amount] field. Then I have the [Year] and [Month] so I can filter. Month data is numerical (ex. 1,2,3 ect.)

    My issue is this, i cannot for the life of me, figure out how to pull a report/form/query with the following structure. I put "" around the fields i want calculated.

    [Salesman][Customer][Product Type] - "Sales from 01-2015" - "Sales from 01-2014" - "Percentage Difference"

    I have been able to pull a cross-tab query where I calculate the Monthly Sales grouped by the [Salesman][Customer][Product Type]. That gives me 12 columns 01,02,03,04,05, ect. with that [Sales Amount] as the sum value. I cannot figure out how to get 01 (janurary) sales from 2014 in one column, and 01 sales from 2015 in another column. Because in the cross-tab query the [Year] is still a row, not a column.

    The frustrating part is that if I pull a pivot table in excel, it takes two seconds to get what I want. Access 2013 doesn't seem to ahve this feature. But I don't want my end users using excel, I want to build a nice looking report for them to open and print so they can't screw it up.

  2. #2
    CJ_London is offline VIP
    Windows 8 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,932
    with your crosstab query, create a new column Period:format([Month],"00") & "-" & [Year] and make this your column header instead of month - and remove year as a row heading

    note month and year are reserved words, so using them as field names can cause unexpected problems

  3. #3
    exbaitman is offline Novice
    Windows 8 Access 2013
    Join Date
    Mar 2015
    Posts
    4
    EDIT- Never mind my below question, I used the "sum" feature instead of the "first" feature and got my desired results. I am going to leave question for other just in case.

    OK, I got that pulling the correct data in different columns. Thank you so much.

    But, as usual when learning something new, that fix has created a new question.

    It separated the items into columns, 01-2014,01-2015, 02-2014, 02-2015, ect. But each entry is its own row now. So the sales from 01-2014 are on a different row from the sales for 01-2015. I tried doing a "total" query and choosing"first" for these columns but that left out a lot of data.

    Any idea how to shrink that back into one row?




    Quote Originally Posted by exbaitman View Post
    OK I have sales data entered in a DB like this. Each [] is a column.

    [Saleman][Customer][Product Type][Month][Year][[Sales amount]

    Our company reports sales monthly to see how people are doing. The sales figures are entered in the [Sales Amount] field. Then I have the [Year] and [Month] so I can filter. Month data is numerical (ex. 1,2,3 ect.)

    My issue is this, i cannot for the life of me, figure out how to pull a report/form/query with the following structure. I put "" around the fields i want calculated.

    [Salesman][Customer][Product Type] - "Sales from 01-2015" - "Sales from 01-2014" - "Percentage Difference"

    I have been able to pull a cross-tab query where I calculate the Monthly Sales grouped by the [Salesman][Customer][Product Type]. That gives me 12 columns 01,02,03,04,05, ect. with that [Sales Amount] as the sum value. I cannot figure out how to get 01 (janurary) sales from 2014 in one column, and 01 sales from 2015 in another column. Because in the cross-tab query the [Year] is still a row, not a column.

    The frustrating part is that if I pull a pivot table in excel, it takes two seconds to get what I want. Access 2013 doesn't seem to ahve this feature. But I don't want my end users using excel, I want to build a nice looking report for them to open and print so they can't screw it up.

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

Similar Threads

  1. Help Designing this form
    By johnny878 in forum Forms
    Replies: 1
    Last Post: 12-22-2014, 05:09 PM
  2. Designing A/R aging Form
    By Ray67 in forum Database Design
    Replies: 22
    Last Post: 08-21-2014, 06:07 PM
  3. Form designing.
    By glen in forum Forms
    Replies: 29
    Last Post: 11-07-2012, 07:55 AM
  4. Designing Form (Beginner)
    By ccordner in forum Forms
    Replies: 1
    Last Post: 01-17-2012, 12:02 PM
  5. Designing Form
    By Kookai in forum Forms
    Replies: 0
    Last Post: 07-30-2010, 11:03 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