Results 1 to 12 of 12
  1. #1
    kowen091010 is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Nov 2011
    Posts
    14

    Access Report by Month

    Hello! I am trying to do a report for work that has the following information. I have a table listing Client Name, Account Number, Officer Name, # of Accounts, Date Account Opened, Group #. I need the report to be grouped by client name and it needs to list the Account Number and officer name. It needs to show the information by month for each client. How do I get the report to list the customers information by month without splitting the information into multiple tables?


    What I need for the report:

    Client Name: John Doe Account #: 123456
    January February March April
    # Accounts 3 2 1 5
    Client ID A A B C

    Table I have:

    Client Name: # Accounts Client ID Month
    John Doe 5 A 12/01/10
    John Doe 3 A 11/01/10
    John Doe 2 B 10/01/10
    Jane Doe 4 D 12/01/10
    Jane Doe 2 E 11/01/10
    Jane Doe 1 A 10/01/10

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,626
    In a query the report is based on (or the report's RecordSource sql statement), create a field with expression to extract month from date value, like:
    MonthOpen: Month([Date Account Opened])

    Now you have a field that can be used to group records by month. Are there multiple years in the database? Will need to also group by year or filter to only year of interest. Can create another field for year:
    YearOpen: Year([Date Account Opened])
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    kowen091010 is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Nov 2011
    Posts
    14
    Quote Originally Posted by June7 View Post
    In a query the report is based on (or the report's RecordSource sql statement), create a field with expression to extract month from date value, like:
    MonthOpen: Month([Date Account Opened])

    Now you have a field that can be used to group records by month. Are there multiple years in the database? Will need to also group by year or filter to only year of interest. Can create another field for year:
    YearOpen: Year([Date Account Opened])
    I am able to group the data by month,but cannot get it to read as a vertical column header. Any suggestions?

  4. #4
    June7's Avatar
    June7 is online now VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,626
    I don't understand. Can't get it to read as a vertical column header where? If you can group on this constructed field then it must be in the query.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  5. #5
    kowen091010 is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Nov 2011
    Posts
    14

    Example

    I attached an example of how I would like the report to read. It is currently in a list format.

  6. #6
    June7's Avatar
    June7 is online now VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,626
    Looks like you want to 'pivot' the data. A crosstab query of the grouping query might accomplish. If not, there are other techniques - more complicated queries or VBA code.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  7. #7
    kowen091010 is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Nov 2011
    Posts
    14
    I will test it out! I cannot say I have used pivots before in Access but there is no time like the present to learn. Crosstab didn't seem to work for me. Chances are I am doing something wrong there too. Thank you so much for your help!

  8. #8
    June7's Avatar
    June7 is online now VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,626
    I looked at your sample again. Will dates always be the first of the month? A crosstab can pivot the table to show date headings with total accounts for each ClientID/Name pair but can't get the ID under each date column. If you must have that will need more tricks to accomplish.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  9. #9
    kowen091010 is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Nov 2011
    Posts
    14
    I will probably convert those dates from 12/01/2011 to December 2011. There will be information for every month going forward. I do need to have the ID under each month as well. I have been trying to figure this out for over a week now. I will try anything!

  10. #10
    June7's Avatar
    June7 is online now VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,626
    Your data description above appears inconsistent with the image. There is no field for Officer name and Account Number. Your image shows grouping by Client, Account, Officer. Need more representative data in order to advise. Also the image shows only one Group# for each Client, Account, Officer, Month combination. Can you provide project (copy without confidential data) for analysis?
    Last edited by June7; 11-30-2011 at 03:12 PM.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  11. #11
    kowen091010 is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Nov 2011
    Posts
    14

    Example

    Here is an example database I built. I was able to get the information to work now the problem I am running into is getting the report to read by month & year. We have some months from 2010 & some from 2011 & I do not want to group them together. Any suggestions?

  12. #12
    June7's Avatar
    June7 is online now VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,626
    You could filter the two base crosstab queries. Create a field in each:

    YearOpen: Year(DateAccountOpen)

    Put the desired year in the Criteria row.

    You could use a parameter for the criteria. The input can be a prompt or reference to a textbox on form where the year is entered.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

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

Similar Threads

  1. Replies: 9
    Last Post: 12-02-2011, 12:51 PM
  2. Query / report per month and year
    By ripper in forum Queries
    Replies: 2
    Last Post: 10-24-2011, 07:51 AM
  3. creating a report to count by month
    By kwooten in forum Reports
    Replies: 13
    Last Post: 09-12-2011, 01:29 PM
  4. Replies: 2
    Last Post: 08-25-2010, 01:42 PM
  5. Simple Report by Month
    By leejqs in forum Reports
    Replies: 3
    Last Post: 07-15-2009, 09:24 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