DCount syntax problem?

A

Anne

It seems like this should work...

=DCount("[DevNum]","qry_Deviations","[StudyType] = ' " &
[Forms]![frm_Reports]![lst_Group])

Any thoughts?
 
O

Ofer

If the field StudyType is a string then you need to add another single quote
in the end, and remove the space between the single quote and the double quote

=DCount("[DevNum]","qry_Deviations","[StudyType] = '" &
[Forms]![frm_Reports]![lst_Group] & "'")

If its a number, the remove the single quote from it
=DCount("[DevNum]","qry_Deviations","[StudyType] = " &
[Forms]![frm_Reports]![lst_Group])
 
Top