Might also be worth mentioning that the filtercriteria bit of that could be passed from elsewhere as a variable:If DCount("*","Formrecordsource","[Filterfield]=" & variablename) or if the filter is a string,If DCount("*","Formrecordsource","[Filterfield]='" & variablename"'")