Hi with your help and others I came up with this function which works, however I couldn't see how to use the 'SELECT DISTINCT' any ideas.
Public Function TB_Count(InSource, InField,InFilt)
Dim mydb As Database
Dim myrs1 As Recordset, myrs2 As Recordset
Dim oldid As String
Dim idcount As Long...