By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,611 Members | 1,425 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,611 IT Pros & Developers. It's quick & easy.

Option Group Counts

P: n/a
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
Share this Question
Share on Google+
3 Replies


P: n/a
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

P: n/a
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

P: n/a
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 discussion thread is closed

Replies have been disabled for this discussion.