DCount

aziz rasul

Active member
Local time
Today, 23:04
Joined
Jun 26, 2000
Messages
1,935
I have a table (tblData Comparisons) with data as so

[TelNo] [ALO Identifier] [BLO Identifier]
01254872521 one one
01254987538 one one
01253691424 zero one

I am trying to do a DCount on ?LO Identifier where they are the same. This is what I have

x = DCount("[TelNo]", "[tblData Comparisons]", "[ALO IDENTIFIER]" = "[BLO IDENTIFIER]")

Since 2 records have the same value of "one" in the first two records, I would have expected x to be 2, but I get 0.

Can anyone see what I'm doing wrong?
 
Too many quotation marks (around the =). Try:

x = DCount("[TelNo]", "[tblData Comparisons]", "[ALO IDENTIFIER] = [BLO IDENTIFIER]")
 
Still didn't work.
 
x = DCount("[TelNo]", "[tblData Comparisons]", "[ALO IDENTIFIER] 'one' AND [BLO IDENTIFIER] = 'one'")

The field name crieria must look at a value within the field.
 

Users who are viewing this thread

Back
Top Bottom