423,850 Members | 1,661 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 423,850 IT Pros & Developers. It's quick & easy.

help creating a query to: "count all rows that meet a condition"

P: n/a
Access 2003, trying to count the number of records that meet a
criteria. According to Help:

"In the Database window, click Queries under Objects, and then click
New on the database window toolbar. Add the table, view, or function
you want to summarize in the Diagram pane. "

OK, that's easy.....but then.....

"Right-click the background of the Diagram pane, then choose Group By
from the shortcut menu."
At this point, there is no "Group By" option in the shortcut menu.

What am I missing? Must be something simple.....
Rest of Help, " The Query Designer adds a Group By column to the grid
in the Grid pane. Select * (All Columns) in the rectangle representing
the table, view, or function. The Query Designer automatically fills
the term Count into the Group By column in the Grid pane and assigns a
column alias to the column you are summarizing. Add the data column
that you want to search, and then clear the check box in the Output
column. The Query Designer automatically fills the term Group By into
the Group By column of the grid.

Change Group By in the Group By column to Where. In the Criteria
column for the data column to search, enter the search condition.
TIA, Jim

Nov 13 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
James,
This will probably just confuse you, but underneath all that is an SQL
statement created by the wizard.
It would look something like this:
"SELECT COUNT(*) AS NUM_MATCHED FROM TABLE_1 WHERE TABLE_1.COLUMN_2 =
'APPLES'"

The key piece of this for you is "COUNT(*) AS NUM_MATCHED", which will count
the rows returned in your result.

"James" <jj******@iel.spokane.edu> wrote in message
news:de********************************@4ax.com...
Access 2003, trying to count the number of records that meet a
criteria. According to Help:

Nov 13 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.