First you have
but I want a
query that will return a value of how many times a customer ID is found in the "reference" column.
then you say "control source"....
When I put =
DCount("*","tblClient","Reference=" & [ClientID]) in the control source, I'm getting #Error.
Confusing....Which one do you want?
Look at post #3 again.
June's example is the syntax for a query and does not have an equal sign! In a query, do not use the equal sign.
In the query, it should look something like:
Code:
ClientCount: DCount("*","tblClient","Reference=" & [ClientID])
If you use an equal sign, that is for the control source for a control on a form.
Code:
= DCount("*","tblClient","Reference=" & [ClientID])
Plain as mud, right???
EDIT:
I just looked at the table and the field "Reference" is a TEXT type field. That requires delimiters.
So the syntax for a query
Code:
ClientCount: DCount("*","tblClient","Reference = '" & [ClientID] & "'")
and a control
Code:
= DCount("*","tblClient","Reference = '" & [ClientID] & "'")