The third argument of the function DCount() "WhereCondition" is a
string!
Yes - Except that you are not providing a string as a date. Date() in a query is NOT a string. It is a date/time data type which means that it is actually a double precision number. And the reference to the QuotedDate is also not a string assumming that QuotedDate is defined as a date/time data type which means that internally, it is a double precision number.
The query engine will be comparing two date/time data type fields. There is NO string involved. If however you had a literal in the domain function, that would be a different situation.
=DCount("*";"tblJobRefBook";"JobStatus = 'Quoted' AND QuotedDate < Date()" ---- no string at all.
=DCount("*";"tblJobRefBook";"JobStatus = 'Quoted' AND QuotedDate < #" & Format(Me.SomeDate,"\mm/dd/yyyy\") & "#") --- this is a string
However
=DCount("*";"tblJobRefBook";"JobStatus = 'Quoted' AND QuotedDate < Forms!someform!SomeDate" --- no string at all provided that the SomeDate control is either bound to a date/time field OR is an unbound control bhat has a date type format specified so that the query engine knows it is dealing with a date.
The problem was with the use of "quoted" as the column name argument since it is not the name of a column.
=DCount("StatusName";"tblJobRefBook";"JobStatus = 'Quoted' AND QuotedDate < Date()" ----would have worked although it is inefficient compared to
=DCount("*";"tblJobRefBook";"JobStatus = 'Quoted' AND QuotedDate < Date()"