Mike & Doris Manning
mikedorism at verizon.net
Wed Oct 12 08:55:37 CDT 2005
Add a column to the select query that contains the following... IIF(Field1 = "X", 1, 0) + IIF(Field2 = "X", 1, 0)...+ IIF(Field7 = "X", 1,0) This will sum all 7 fields giving you the total X count. Doris Manning mikedorism at verizon.net -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Boyd, Mark Thomas (US - Philadelphia) Sent: Wednesday, October 12, 2005 9:41 AM To: AccessD Subject: [AccessD] Counting Fields I have a table that contains a value of "X" in any or all of 7 fields. For example, Record 1 has an "X" in fields [Field1], [Field2], and [Field7]. Is there an easy way within a select query to get a total count of "X"'s in the record? Thanks, Mark Boyd Sr. Consultant Deloitte & Touche LLP This message (including any attachments) contains confidential information intended for a specific individual and purpose, and is protected by law. If you are not the intended recipient, you should delete this message. Any disclosure, copying, or distribution of this message, or the taking of any action based on it, is strictly prohibited. [v.E.1] -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com