[AccessD] Counting a text field

Shamil Salakhetdinov shamil at users.mns.ru
Sat Dec 2 05:19:06 CST 2006


John,

If you field is called, say, myField and it is of type Text and your table
is called myTable then this query should work:

SELECT Count(myField) AS CountOfmyField
FROM myTable
GROUP BY myField
HAVING myField = 'Y'

--
Shamil
 
-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of John Eget
Sent: Saturday, December 02, 2006 11:17 AM
To: Access Developers discussion and problem solving
Subject: [AccessD] Counting a text field

I am trying to use one query to count within a series of records how many
total items of a field are a Y.   So If I have lets say ten records and 4 of
a specific field are a Y then one of the outputs of a calculated field would
be a numerical 4.  Does anyone have an idea how to do this?

Thanks
John 
-- 
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com




More information about the AccessD mailing list