Results 1 to 4 of 4
  1. #1
    Jahangps is offline Novice
    Windows 7 32bit Access 2007
    Join Date
    Jan 2015
    Posts
    2

    Post How to count the same field value from a query field and show the result in a report?

    Hi Experts,
    I am very new at MS Access. Pls look at following Query:


    QUERY:1
    STUDENT'S ID JANUARY FEBRUARY MARCH TOTAL
    1 100 100 100 300
    2 0 100 100 200
    3 125 125 0 250
    4 100 100 100 300
    5 100 0 100 200
    6 125 0 125 250
    7 0 100 100 200
    Here in 'JANUARY' field, 100 occurs 2 times, 125 occurs 2 times.
    Here in 'FEBRUARY' field, 100 occurs 4 times, 125 occurs 1 time.
    Here in 'MARCH' field, 100 occurs 5 times, 125 occurs 1 time.
    Here in 'TOTAL' field, 200 occurs 3 times, 250 occurs 2 times and 300 occurs 2 times.

    Now I would like to show it in a report like following;
    REPORT:1
    MONTH JANUARY 100 125 FEBRUARY 100 125 MARCH 100 125 TOTAL 300 250 200
    OCCURING TIMES -------- 3 2 ---- 4 1 ---- 5 1 ---- 2 2 3
    Pls, help me in making the report. Thanks to all.
    Last edited by Jahangps; 01-03-2015 at 06:59 PM.

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,928
    Is that a CROSSTAB query? Building a report to run perpetually based on a CROSSTAB can be difficult. Do you have multi-year data in this db?

    I see 3, not 2, 100 under January.

    That is a very 'out of the ordinary' report structure. I don't think a query alone can do that. Probably require VBA and writing records to a temp table.
    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
    Jahangps is offline Novice
    Windows 7 32bit Access 2007
    Join Date
    Jan 2015
    Posts
    2
    Yes, It should be 3, not 2, under January. Now I edited it. Thanks to June7.

  4. #4
    Demerit's Avatar
    Demerit is offline Competent Performer
    Windows 7 32bit Access 2007
    Join Date
    Nov 2013
    Posts
    125
    It is possible to reproduce a report like the one above except you will have to deal with alot of VBA.

    I mean alot, starting from an unbound form to the report concern

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

Similar Threads

  1. Replies: 4
    Last Post: 04-03-2014, 08:03 AM
  2. Replies: 4
    Last Post: 07-28-2013, 12:40 AM
  3. Replies: 2
    Last Post: 05-30-2012, 07:53 AM
  4. Query Help - Show field if another field is null
    By lukekonrad in forum Access
    Replies: 1
    Last Post: 03-05-2012, 04:02 PM
  5. Replies: 2
    Last Post: 09-26-2009, 07:19 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