Results 1 to 3 of 3
  1. #1
    sadozai is offline Novice
    Windows XP Access 2007
    Join Date
    Dec 2011
    Posts
    2

    Smile Report based on combo box values as columns

    Dear Experts!
    I am an access novice. I have a table in which there is a column of AGE and CITY besides some other columns. For CITY, there is also another table which is linked to this table.
    I want to make a report group by city and the number of records in each city falling under the following age pattern should show;

    CITY (Age between 0-3) (Age between 4-7) (Age between8-12)

    NY 10 5 20
    LA 25 30 37

    Can anybody help me with this problem? I am new in this forum and will highly appreciate a good solution.



    Thanks

  2. #2
    Robeen is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    Mar 2011
    Location
    Tulsa, Oklahoma.
    Posts
    1,596
    There is a column in your table for AGE?
    What will happen when a year passes and the age increases?
    Will that age have to be changed in the table?

  3. #3
    Robeen is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    Mar 2011
    Location
    Tulsa, Oklahoma.
    Posts
    1,596
    Nevertheless . . . here is one way you can deal with the issue you had:

    1. Create a query using the City and Age fields from your table.
    2. In a new field in your query put this:
    Code:
     Age_Group: IIf([Age]<4,"0 - 3",IIf([Age]>7,"8 - 12","4 - 7"))
    This will put each of your Age values into one of the three age-groups.
    I haven't considered any age-groups other than what you mentioned.
    The highest Age I put in my test table was 12.
    3. Run the query to see that it did what you expected.
    4. Click the Make Table button at the top.
    5. Save and run the query - it will create a new Table - with an Age-Group column. You can open it to check it is correct.
    6. Click Create -> Query Wizard -> Crosstab Query Wizard.
    7. Follow the steps selecting City for the 'Row' and Age_Group for the 'Column'.

    That should give you what you need.

    Let me know if that helps!!

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

Similar Threads

  1. Replies: 9
    Last Post: 08-30-2011, 04:08 PM
  2. Replies: 10
    Last Post: 07-02-2011, 11:51 AM
  3. Combo Box values based on preceding selection
    By speckytwat in forum Access
    Replies: 11
    Last Post: 04-27-2011, 11:35 AM
  4. Replies: 1
    Last Post: 03-27-2010, 06:13 AM
  5. Replies: 1
    Last Post: 08-26-2009, 10:45 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