In a VBA module, I need to get a count of records from a particular recordset, not a table. Is there some way I can embed the SQL statement in the DCount instead of using a table name?
Something like the Code sample below?
If DCount("Zip", "SELECT tbl_PostalCodes_US.Zip FROM tbl_PostalCodes_US WHERE (((tbl_PostalCodes_US.Zip)=Left('" & Me.[Zip] & "',5)));") > 1 Then