Results 1 to 2 of 2
  1. #1
    5 Star Lounger
    Join Date
    Oct 2001
    Location
    San Bernardino, California, USA
    Posts
    734
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Simple Query help - grouping & counting (97)

    My DB has several fields - one field (TYPE) contains one of two possible values (G & N). another is a date field. I would like a query (or two) that provides:

    1) total number of Type G & total number of Type N. Whenever I try to use grouping and count, I always get some mismatch error.

    2) Number of G & N by month.

    I may be using the term Query wrong - maybe what I need is a report. In any case, I have determined after several hours that I don't know how to do this and my searches though the lounge have not helped.

    Thank in advance for any help.

  2. #2
    Super Moderator
    Join Date
    Jun 2002
    Location
    Mt Macedon, Victoria, Australia
    Posts
    3,993
    Thanks
    1
    Thanked 45 Times in 44 Posts

    Re: Simple Query help - grouping & counting (97)

    Have a look at the attached demo.
    You do the grouping/counting in queries, but then display the results in a report.

    There are three queries.
    * One does the overall count
    * One does the count by month
    * Third is an alternative top the second. Does it as a crosstab.

    There is then one report, with three subreports. Each subreport is based on one of the queries.
    Making reports from crosstab queries is usually a bit complicated, but in this case the number of columns is fixed so it should work OK.
    Regards
    John



Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •