Counting Query

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi ;

I have two tables that are linked with a primary key . (Table1 , Table2)
This primary key field is called [Check Number].

1)It is possible that there is a [Check Number] in “Table1†but not in
“Table2†and it is not possible otherwise . (one to many relationship)
2)All the [Check Number]s in Table1 is unique but there can be many of them
repeated in Table2 .
(one to many relationship)
3)There is one more field in “Table1†that I would like to use in my query
called [Responsibility]

What I would like to do is ;

Count the number of [Check Number] in “Table2†by [Responsibility] .

Can someone pls help me for my above query.

Steve
 
I am probably missing something here but it seems to me that all you have to
do
is add Table2.Checknumber and Table1.Responsibility to the design grid and
hit the Totals button (Greek letter on Toolbar or Menu Bar >View>Totals). In
the Totals row for Responsibility select GroupBy and for CheckNumber select
Count.
(Hoping this wasn't a trick question)
Ed G
 
Hi Ed ;

Thanks for you reply.
Perhaps i could not make my question clear .
Yes,your solution counts the [Check Number] but it counts each
single record where there may be many of the same [Check Number].
For example there are 1500 [Check Number] but only 75 of them is
unique . I want my query count 75 .

Hope thats clear .
Steve

Edward G said:
I am probably missing something here but it seems to me that all you have to
do
is add Table2.Checknumber and Table1.Responsibility to the design grid and
hit the Totals button (Greek letter on Toolbar or Menu Bar >View>Totals). In
the Totals row for Responsibility select GroupBy and for CheckNumber select
Count.
(Hoping this wasn't a trick question)
Ed G

Steve said:
Hi ;

I have two tables that are linked with a primary key . (Table1 , Table2)
This primary key field is called [Check Number].

1)It is possible that there is a [Check Number] in "Table1" but not in
"Table2" and it is not possible otherwise . (one to many relationship)
2)All the [Check Number]s in Table1 is unique but there can be many of them
repeated in Table2 .
(one to many relationship)
3)There is one more field in "Table1" that I would like to use in my query
called [Responsibility]

What I would like to do is ;

Count the number of [Check Number] in "Table2" by [Responsibility] .

Can someone pls help me for my above query.

Steve
 
Sorry, not clear to me. I suggest you repost your question because at this
point the thread is buried. You might want to supply some detail to clarify
what you are after.


Steve said:
Hi Ed ;

Thanks for you reply.
Perhaps i could not make my question clear .
Yes,your solution counts the [Check Number] but it counts each
single record where there may be many of the same [Check Number].
For example there are 1500 [Check Number] but only 75 of them is
unique . I want my query count 75 .

Hope thats clear .
Steve

Edward G said:
I am probably missing something here but it seems to me that all you have to
do
is add Table2.Checknumber and Table1.Responsibility to the design grid and
hit the Totals button (Greek letter on Toolbar or Menu Bar View>Totals). In
the Totals row for Responsibility select GroupBy and for CheckNumber select
Count.
(Hoping this wasn't a trick question)
Ed G

Steve said:
Hi ;

I have two tables that are linked with a primary key . (Table1 , Table2)
This primary key field is called [Check Number].

1)It is possible that there is a [Check Number] in "Table1" but not in
"Table2" and it is not possible otherwise . (one to many relationship)
2)All the [Check Number]s in Table1 is unique but there can be many of them
repeated in Table2 .
(one to many relationship)
3)There is one more field in "Table1" that I would like to use in my query
called [Responsibility]

What I would like to do is ;

Count the number of [Check Number] in "Table2" by [Responsibility] .

Can someone pls help me for my above query.

Steve
 
Back
Top