DCount syntax problem?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

It seems like this should work...

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

Any thoughts?
 
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])
 
Back
Top