The information in this article applies to:
Moderate: Requires basic macro, coding, and interoperability skills. This article applies only to a Microsoft Access database (.mdb). SYMPTOMSWhen you use a domain function in a totals query and set the Total row to Group By, the domain function may return meaningless data. CAUSEWhen you set a field in a totals query to Group By, the data returned is of an unknown data type. Microsoft Access 2000 maps unknown data types to the Binary data type. The output of the query is the representation of that binary output. RESOLUTION
You can wrap the domain function in one of the conversions functions to return the correct data type. For example, you could convert the value returned to an integer by using either the CInt() or CLng() functions.
STATUSMicrosoft has confirmed this to be a problem in the Microsoft products listed at the beginning of this article. MORE INFORMATION
This behavior occurs when a domain function returns a number. This behavior does not occur when you use domain functions on strings.
However, the following is a valid SQL statement that returns each EmployeeID from the Employees table and a count of the number of orders each employee has taken. This query uses the Count() aggregate function to completely avoid the DCount() function.
You can get the same results by using the DCount() function in the query, but by not using a totals query.
Additional query words: pra
Keywords : kbdta QryProb |
Last Reviewed: July 19, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |