Sure this is a simple one, but I can't see it. I am getting a type mismatch on this:
where this part works:
Seems as if it doesn't like my "And" in there, but I can't figure out how to do it. visitRepsID and visitID are both numbers and repRole is string from table JUNCtblSiteVisits_Reps. I am basically wanting to count the records in the junction table for this particular record (visitID) labeled as primary.
Thanks in advance!
Code:
= DCount("[visitRepsID]", "JUNCtblSiteVisits_Reps", "[visitID] =" & [Forms]![Copy of SiteVisitDetails]![visitID] And "[repRole] = 'Primary'")
Code:
= DCount("[visitRepsID]", "JUNCtblSiteVisits_Reps", "[visitID] =" & [Forms]![Copy of SiteVisitDetails]![visitID])
Thanks in advance!