A Microsoft Office (Excel, Word) forum. OfficeFrustration

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.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Database Design
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

counting yes in yes/no data types



 
 
Thread Tools Display Modes
  #1  
Old January 7th, 2010, 08:04 PM posted to microsoft.public.access.tablesdbdesign
KARL DEWEY
external usenet poster
 
Posts: 10,767
Default counting yes in yes/no data types

Do not us Count but Sum like this --
=Abs(Sum([SOP]))
=Abs(Sum([Protocols]))

A 'Yes' is stored as a -1 (minus one) and the Abs function removes the
negative sign.

--
Build a little, test a little.


"Emelda" wrote:

I am having trouble getting a total count in the report footer for yes/no
data types.

For example, if I have a document number as the primary key in one table
containing general information and as the foreign key in a second table
containing document type information and other information. The different
types of documents are listed as checkboxes (yes/no data type) and there can
be more than one document type selected for each document number.

Then in the report footer, I am trying to get a total count of the
individual document types (e.g., SOPs and protocols). I am using
=Count([SOP]) and =Count([Protocols]) with the associated label. Instead of
obtaining a total number of documents for which the checkbox for SOPs is
checked and the total number of documents for which the checkbox for
protocols is checked, it returns a "yes" for both. How can I get Access to
count the documents whose SOP checkbox is checked and return a number value
and make sure it does not include those with a null value?

I figure that there is an easy solution to this, but I seem to be missing it.

Another question is regarding the use of checkboxes compared to using combo
boxes. Are there advantages or disadvantages? It seems that with combo boxes
only one choice can be selected whereas multiple checkboxes can be used.

Thank you in advance.

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 11:45 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.