Can someone please help me? I'm trying to count the distinct instances in a field and just store that number in a vba variable. I can create queries in Access and save this info in a table, and then DLOOKUP, but that seems too convoluted.
Code:
SELECT Count(FieldA) FROM (SELECT DISTINCT FieldA FROM tblExample)