Hello guys
I try to use this expression in the report, but am having this letter
data type mismatch in criteria expressionCode:=DCount("*";"QueryAll";"PartID='Cement resistant'")
What is the problem ?
Hello guys
I try to use this expression in the report, but am having this letter
data type mismatch in criteria expressionCode:=DCount("*";"QueryAll";"PartID='Cement resistant'")
What is the problem ?
Is the PartID field in the QueryAll a number or text? Your error suggests it is a number.
Thank you very much Allan
Yes exactly is the number on the report, but I use (Column Count 3).
So what is working ?
I want to do and the liquidation of the materials
Is the PartID field a Lookup Field? If so, that will not work.
Thank you Allan
Is it possible to obtain an expression for Lookup ?
I do not think it is possible in an expression using DLookup. The field is a complex data type and I do not think the multi-value field will work.
Thank you Mario
I have used this expression, but also to no avail.
Is there any other solution?=Count(IIf([PartID ]="Cement resistant",0))
Create a new query object and add "QueryAll" to the design surface.
Add the column that represents your field.
Add criteria to your new column.
Use 'Cement resistant' as the criteria.
Save your new query and name it.
Use the name of your new query in your DCount expression.
Also, there is more than one way. But, I think this is the simplest. Hopefully I am understanding correctly.
The same problem Mario
I have worked as I have a new query
And used the following expression
=DCount("*";"Query6";"(PartID = 'Cement resistant' )")
But it appears to me #ُError
Does Query6 work correctly? Does it only retrieve the correct number of records?
If Query6 is working, then ...
=DCount("[PartID]", "Query6")
or
=DCount("*", "Query6")