DCount using 2 criterias in a txt box control source

ppoindexter

Registered User.
Local time
Today, 16:36
Joined
Dec 28, 2000
Messages
134
I have place the code below (example A) in the control source for a text box on a form and it works fine but i need to add a second criteria to it...i cant seem to get the code (example B) to work (i get no results)....any ideas?
thanks

EXAMPLE A

=DCount("fldOneID","tblRED","fldOneID=2")


EXAMPLE B
=DCount("fldOneID","tblRED","fldOneID=2") AND ("fldTwoID","tblRED","fldTwoID=4")
 
i got it working using the code below

=DCount("[fldOne]","tblRED","[fldOne]=1" & "and [fldTwo]=45")
 

Users who are viewing this thread

Back
Top Bottom