Count(*) Syntax

G

Guest

Hi all,

I want to create report that looks like a spreadsheet, and according to the
reference book I bought I think I need to use the Count(*) in my query.

Should look like:

Region | 1 Facilitator | 2 Facilitators | 3 Facilitators
region a
region b

I want it to count the number of groups that had 1 Facilitator in region a,
etc.
In the Total row I've tried "=Count(*)", selecting Expression and putting
=Count(*) in the criteria line and Access keeps telling me to choose from the
list.

Currently the "Co-facilitation" column is filled with numbers 0, 1, or 2.
I've also tried in the report and it didn't work:
=Count(IIf([Co-facilitation]=0,[CountOfCo-facilitation],0))

How to make this work or another idea to get the data out would be much
appreciated.

Newbie using Acess 2000 on XP; thx for any suggestions!
~Karen
 
G

Guest

In the words of the late, great Gilda Radner..."never mind." I'm not sure
why this works now (I've been fighting with it for about 4 hours now) but (in
case others can use this) I used this and it worked!

=Sum(IIf([Co-facilitation]=0,[CountOfCo-facilitation],0))

thx,
karen
 
M

Michel Walsh

Hi,


It seems you can explore the possibility to use a crosstab too. The Query
Wizard will allow you to easily make your own experimentations, and the
overall work would probably be much easier.


Hoping it may help,
Vanderghast, Access MVP


klam said:
In the words of the late, great Gilda Radner..."never mind." I'm not sure
why this works now (I've been fighting with it for about 4 hours now) but
(in
case others can use this) I used this and it worked!

=Sum(IIf([Co-facilitation]=0,[CountOfCo-facilitation],0))

thx,
karen

klam said:
Hi all,

I want to create report that looks like a spreadsheet, and according to
the
reference book I bought I think I need to use the Count(*) in my query.

Should look like:

Region | 1 Facilitator | 2 Facilitators | 3 Facilitators
region a
region b

I want it to count the number of groups that had 1 Facilitator in region
a,
etc.
In the Total row I've tried "=Count(*)", selecting Expression and putting
=Count(*) in the criteria line and Access keeps telling me to choose from
the
list.

Currently the "Co-facilitation" column is filled with numbers 0, 1, or 2.
I've also tried in the report and it didn't work:
=Count(IIf([Co-facilitation]=0,[CountOfCo-facilitation],0))

How to make this work or another idea to get the data out would be much
appreciated.

Newbie using Acess 2000 on XP; thx for any suggestions!
~Karen
 
G

Guest

Thx for the reply Michel. I think I will do some experimenting.

cheers,
karen

Michel Walsh said:
Hi,


It seems you can explore the possibility to use a crosstab too. The Query
Wizard will allow you to easily make your own experimentations, and the
overall work would probably be much easier.


Hoping it may help,
Vanderghast, Access MVP


klam said:
In the words of the late, great Gilda Radner..."never mind." I'm not sure
why this works now (I've been fighting with it for about 4 hours now) but
(in
case others can use this) I used this and it worked!

=Sum(IIf([Co-facilitation]=0,[CountOfCo-facilitation],0))

thx,
karen

klam said:
Hi all,

I want to create report that looks like a spreadsheet, and according to
the
reference book I bought I think I need to use the Count(*) in my query.

Should look like:

Region | 1 Facilitator | 2 Facilitators | 3 Facilitators
region a
region b

I want it to count the number of groups that had 1 Facilitator in region
a,
etc.
In the Total row I've tried "=Count(*)", selecting Expression and putting
=Count(*) in the criteria line and Access keeps telling me to choose from
the
list.

Currently the "Co-facilitation" column is filled with numbers 0, 1, or 2.
I've also tried in the report and it didn't work:
=Count(IIf([Co-facilitation]=0,[CountOfCo-facilitation],0))

How to make this work or another idea to get the data out would be much
appreciated.

Newbie using Acess 2000 on XP; thx for any suggestions!
~Karen
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top