Hi,
The arguments must be separated by ; (assuming ; is your list
separator), but a ; included inside a string does not count as an argument
delimiter. A string starts with a " and ends with a ".
So, your first argument is probably "[id]" and then, the semi colon.
The " after the ] is required to end the string, BEFORE you use the ;
The second argument is a table name. I doubt field1 is a table name.
The third argument should be a valid criteria for a WHERE clause,
Sum([id] => 1
is not a valid criteria for a where clause. A closing parenthesis is
missing, and an aggregate, here Sum, cannot appear in a WHERE clause.
DCount( "aFieldOrAnExpressionHere" ; "tableNameHere" ;
"aCriteriaHere" )
would be a valid expression. WHAT result are you expecting (rather than HOW
you are trying to get it)?
Hoping it may help,
Vanderghast, Access MVP
Ezekiël said:
Anyone knows how to sum the double records in a dcount() function.
I have this Dcount("[id];"[field1]";"Sum([id]=>1")
That did not work, somebody can correct me?