I'm using MS Access 2007.
I have fields in query "qryLotData" named "FormattedDate" (derived via CDate([datefield])) and "Dateweek" (derived from Format([FormattedDate],"ww")).
I'm trying to use the DCount function in a form to count the number of entries week-to-date. My formula in the Control Source field is as follows:
=DCount("[FormattedDate]","qryLotData","[DateWeek]=Format(Now(),"ww")")
I keep getting the error message "The expression you entered contains invalid syntax. You may have entered an operand without an operator." I'm pretty sure that's not the case, and Microsoft's database tells me I should be able to do this, but I can't seem to figure out what's wrong. Any suggestions?