Pocket Excel: "#VALUE" Error Value When Querying Database (186856)



The information in this article applies to:

  • Microsoft Windows CE 2.0 for the Handheld PC
  • Microsoft Pocket Excel 2.0

This article was previously published under Q186856

SYMPTOMS

When you use the Dcount or Dcounta function to perform a database query in Microsoft Pocket Excel, the cell containing the function may display a "#VALUE!" error value.

CAUSE

This behavior can occur if you do not define the Field argument in the Dcount or Dcounta function.

RESOLUTION

To work around this problem, use the appropriate method for the Pocket Excel function you want to use.

Dcount Function

To work around this problem when you use the Dcount function, use an equation similar to the following sample
   =dcount(<database>,<field>,<criteria>)
				
where <database> is the range of cells that make up the list or database, <field> is the number of a column in the database that contains numeric data, and <criteria> is the range of cells that contains the conditions you specify.

NOTE: The Dcount function does not count a row in which the cell in the selected column does not contain numeric data, even if the row otherwise matches the search criteria.

Dcounta Function

To work around this problem when you use the Dcounta function, use an equation similar to the following sample
   =dcounta(<database>,<field>,<criteria>)
				
where <database> is the range of cells that make up the list or database, <field> is the number of a column in the database, and <criteria> is the range of cells that contains the conditions you specify.

NOTE: The Dcounta function does not count a row in which the cell in the selected column is empty, even if the row otherwise matches the search criteria.

STATUS

Microsoft has confirmed this to be a problem in the Microsoft products listed at the beginning of this article.

MORE INFORMATION

In Microsoft Excel for Windows, if you omit the Field argument in the Dcount or Dcounta function, the Dcount or Dcounta function counts all records in the database that match the criteria. In Pocket Excel, you cannot omit the Field argument in the Dcount or Dcounta function.

Modification Type:MajorLast Reviewed:2/24/2004
Keywords:kbprb KB186856