Access SQL can't combine DISTINCT and aggregation. Try this:
Public Function getBoxContent()
oDB.Execute "DELETE * FROM counted", dbFailOnError
sQry = "INSERT INTO counted ( Family, Infra, box, collection, Specimens ) " _
& " SELECT A.Family, A.infra, A.BoxNo, A.Collection...