If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Counted Field
Hi,
I set up the table that has field named CCA. Its data type is YES/NO. Is it posible to count how many Yes or how many No in the forms or reports? Please show me if it is Ok to make a total. If it is not, do I need to change its data type to NUMBER? Thanks Chi Huynh |
#2
|
|||
|
|||
Counted Field
Access stores a Yes/No field as minus one or a zero. If you sum the field
the Yeses will total as a negative sum. Use function INT to remove the sign like -- Int(Sum([YourField]) "Chi" wrote: Hi, I set up the table that has field named CCA. Its data type is YES/NO. Is it posible to count how many Yes or how many No in the forms or reports? Please show me if it is Ok to make a total. If it is not, do I need to change its data type to NUMBER? Thanks Chi Huynh |
#3
|
|||
|
|||
Counted Field
Use the DCount function
lngYes = DCount("[CCA]", "MyTableName", "[CCA] = -1 ") lngNo = DCount("[CCA]", "MyTableName", "[CCA] = 0 ") "Chi" wrote: Hi, I set up the table that has field named CCA. Its data type is YES/NO. Is it posible to count how many Yes or how many No in the forms or reports? Please show me if it is Ok to make a total. If it is not, do I need to change its data type to NUMBER? Thanks Chi Huynh |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Form, Subform, Tab key | 2nd_Stage_User | Using Forms | 17 | August 25th, 2006 12:30 AM |
LOOKUP FOR A VALUE ON A TABLE | Samora | New Users | 9 | February 22nd, 2005 01:06 PM |
New Record Update | Michelle | Using Forms | 5 | October 28th, 2004 07:59 AM |
field manipulation | Steve | Running & Setting Up Queries | 2 | May 28th, 2004 03:12 PM |
Supress blank lines in DOCPROPERTY field | Mary | Formatting Long Documents | 10 | May 25th, 2004 07:27 PM |