Results 1 to 4 of 4
  1. #1
    gerhard_s is offline Novice
    Windows XP Access 2003
    Join Date
    Sep 2010
    Location
    Germany
    Posts
    2

    Report people grouped to years

    Hi,

    I have a table containing names and dates of birth.

    Now I want to create a report that gets as input a sports season selected by the user (which defines deadlines for age groups).

    Based on the entered season, the output list should look like:
    In 2010/11 members are in following categories
    ===================================

    U18 (01.01.1993 to 31.12.1995)


    -------------------------------
    Sabrina 12.02.1993
    Tom 15.02.1994

    U15 (01.01.1996 to 31.12.1997)
    -------------------------------
    Sam 02.03.1996

    U13 (01.01.1998 to 31.12.1999)
    -------------------------------

    and so on...
    What is the best way to do this?
    One report with a sub report for each category and each subreport running a query? Or is there something more simple?
    Can a report pass a parameter to a query (i.e. for searching the people of various age groups)?

    Thanks for your help!

  2. #2
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 Access 2010 (version 14.0)
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    Ask your question of the user in a form, which can pass this information on to a query. A report is just basically a piece of paper.

  3. #3
    weekend00 is offline I may not be right
    Windows XP Access 2003
    Join Date
    Aug 2010
    Posts
    1,295
    one report with group by age groups can do it. The key is to decide the group.

    Create a table grouptable:
    grp fromAge toAge
    U19 19 99
    U18 16 18
    U15 14 15
    U13 12 13
    U11 0 11

    In your form "MyForm", put season in a combo box "cb_season" cb_season showing "10/11","09/10" but values is 2011, 2010 ( you may type in values or create a table for these)

    use following query as data source of the report:

    SELECT grouptable.Grp, MemberTable.MemName, MemberTable.birthday
    FROM MemberTable, grouptable
    WHERE ((([forms]![myform]![season]-Year([birthday])) Between [fromage] And [toage]));

    In the report, create group by Grp.

  4. #4
    gerhard_s is offline Novice
    Windows XP Access 2003
    Join Date
    Sep 2010
    Location
    Germany
    Posts
    2

    Thumbs up Solved!

    Hello weekend00,

    thanks for your support! With your hints and some experiments I got it solved and it works fine now!

    Br,
    Gerhard

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

Similar Threads

  1. Replies: 2
    Last Post: 08-25-2010, 01:42 PM
  2. Replies: 0
    Last Post: 12-28-2009, 12:14 PM
  3. Replies: 2
    Last Post: 12-15-2009, 10:41 AM
  4. Grouped Report Missing Data
    By travismd in forum Reports
    Replies: 1
    Last Post: 11-30-2009, 11:08 AM
  5. Query Multiple years
    By sammer021486 in forum Queries
    Replies: 3
    Last Post: 10-21-2009, 02:13 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