473,406 Members | 2,378 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

Option Group Counts

El
I can get a total count for a whole option group field, but I need to
be able to count each individual selection in an option group on a
report. For example if I had a yes or no option...I would need to know
how many yes selections there are and how many no selections there are.
Please help!!

Feb 27 '06 #1
3 4271
On 27 Feb 2006 09:29:33 -0800, El wrote:
I can get a total count for a whole option group field, but I need to
be able to count each individual selection in an option group on a
report. For example if I had a yes or no option...I would need to know
how many yes selections there are and how many no selections there are.
Please help!!


Is this "Option Group field" a Number datatype or is it really a
CheckBox Yes/No (Boolean datatype) field?

If it is a CheckBox Yes/No field then it's values are either -1 (for
Yes) or 0 (for No).
In an unbound control on the report:
For Yes:
=ABS(Sum([FieldName]))

For No:
=Sum([FieldName] + 1)

If it really is an Option Group then the values are usually 1,2,3 etc.
=Sum(IIf([FieldName]=1,1,0))
=Sum(IIf([FieldName] = 2,1,0))
=Sum(IIf([FieldName] = 3,1,0))
etc.

Make sure the name of the control on the report is not the same as the
name of the [FieldName] in it's control source expression.
--
Fred
Please respond only to this newsgroup.
I do not reply to personal e-mail
Feb 27 '06 #2
El
When I enter =Sum(llf([FieldName]=1,1,0)) it gives me an error and says
undefined function "llf" in expression. What does this mean? Please
help!! Thanks!

Feb 28 '06 #3
On 28 Feb 2006 15:24:33 -0800, El wrote:
When I enter =Sum(llf([FieldName]=1,1,0)) it gives me an error and says
undefined function "llf" in expression. What does this mean? Please
help!! Thanks!


1) Are you absolutely sure you spelled it IIf and not Iff?

2) Make sure the name of this control is not the same as the name of
the field used in the expression.

3) Open any module in Design view (or click Ctrl + G).
On the Tools menu, click References.
Click to clear the check box for the type library or object library
marked as "Missing:."

An alternative to removing the reference is to restore the referenced
file to the path specified in the References dialog box. If the
referenced file is in a new location, clear the "Missing:" reference
and create a new reference to the file in its new folder.

See Microsoft KnowledgeBase articles:
283115 'ACC2002: References That You Must Set When You Work with
Microsoft Access'
Or for Access 97:
175484 'References to Set When Working With Microsoft Access' for
the correct ones needed,
and
160870 'VBA Functions Break in Database with Missing References' for
how to reset a missing one.

For even more information, see
http://www.accessmvp.com/djsteele/Ac...nceErrors.html

--
Fred
Please respond only to this newsgroup.
I do not reply to personal e-mail
Mar 1 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Rich Protzel | last post by:
Hello, So my table contains say 100,000 records, and I need to group the categories in fld1 by the highest count of subcategories. Say fld1 contains categories A, B, C, D, E. All of these...
4
by: Old Lady | last post by:
Hi, I need help! I have a SELECT/OPTION list. My goal is to have a TEXT input field in a form that is normally disabled, but it should become enabled when the user select one predefined OPTION....
3
by: Stewart | last post by:
Dear comp.lang.javascript, I have more than once wanted to manipulate the contents of select boxes dynamically, whilst the boxes contain <optgroup> tags. Manipulation of a select box containing...
2
by: Charles | last post by:
Ok, so I'm creating a form on the fly. I can create the option group, I can create the checkboxes, but I can't figure out how to bind them to the option group I'm creating them within. I was...
3
by: Abhi | last post by:
Hi! I am wondering if this query is possible somehow: I have a table with many fields that all can have a value from 1 to 5. if I wanna see the count of each value from one field, then this...
5
by: b. hotting | last post by:
Hi, I would like to count inspections and group them by customer (for those where the repdate = #1/1/1900#) Something like: SELECT customerid, count() AS Inpections FROM inspection WHERE...
1
by: John | last post by:
Hi I have a field that can have either A, B or C as its value. I need to write a query that will return the number of A's, B's & C's in the field X for a given criteria and then the total...
2
by: Thelma Lubkin | last post by:
I've been unable to find code for adding an option to an option group. I did find this instruction on a site called softlookup.com: "If you want to add another option button to an option group,...
1
by: richforsandy | last post by:
I am working with a two field table of 144,020 rows. The PERSONID field is the FK and the ADDRESSID is the PK. FK is a number type, PK is autonumber. PERSONID represents employees,...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.