Boyd, Mark Thomas (US - Philadelphia)
mboyd at deloitte.com
Wed Oct 12 09:13:51 CDT 2005
Thanks Doris, this is what I needed. Mark Boyd Senior Consultant Enterprise Risk Services Deloitte & Touche LLP Tel: +1 215 405 5576 mboyd at deloitte.com www.deloitte.com -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Mike & Doris Manning Sent: Wednesday, October 12, 2005 9:56 AM To: 'Access Developers discussion and problem solving' Subject: Re: [AccessD] Counting Fields 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 -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com