Microsoft KB Archive/96588

{|
 * width="100%"|

PRB: Macro Condition Example Using COUNT Is Incorrect
'Article ID: Q96588

Creation Date: 22-MAR-1993

Revision Date: 19-SEP-1996' The information in this article applies to:


 * Microsoft Access versions 1.0 and 1.1

SYMPTOMS

Page 519 of the Microsoft Access &quot;User's Guide,&quot; version 1.0, or page 523 of the Microsoft Access &quot;User's Guide,&quot; version 1.1, shows examples of valid conditions to be used in the Condition column in the Macro window. The last example shows the following:

COUNT(Order_ID) > 35 This condition will result in the error message &quot;Can't parse expression.&quot; If you correct the parsing error by adding square brackets and replacing the underscore with a space, as in the following example, COUNT([Order ID]) > 35 you will receive the error message: Function isn't available in expressions. RESOLUTION

To see if the total number of entries in the Order ID field is greater than 35, use the DCOUNT function in a macro expression, as in the following example:

DCOUNT(&quot;[Order ID]&quot;,&quot;Orders&quot;) > 35 If there are more than 35 entries in the Order ID field of the Orders table, the expression above will return TRUE. STATUS

This behavior no longer occurs in Microsoft Access version 2.0.

REFERENCES

For more information on the DCount function, search for &quot;DCount&quot; then &quot;DCount Function&quot; using the Microsoft Access Help menu.
 * }

-

"THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED &quot;AS IS&quot; WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY." '' ©1997 Microsoft Corporation. All rights reserved. Legal Notices.

''

Additional reference words: 1.00 1.10 logical false message

KBCategory: kbusage kbdocerr kberrmsg

KBSubcategory: DcmOthr