if its a number field (AKA column), then why are you encapsualting it with quote marks
if its a text / string literal / column then use quite marks
eg:-
'this is required for text or string columns'
"if you need to use a quote mark, escape it first using \'"
if its a a string representation of a date then it must be encapusalted with # and in US or ISO format
eg:-
us #mm/dd/yyyy#
ISO #yyyy/mm/dd#
using the syntax
is asking for trouble as you are doing no checks on the returning value. if the dcoutn returns null you could have issues. far better to assign the value of the dcount to a variant and then do error checking on the resultant value to make certain your code behaves sanely