count records w/ criteria

skate

Registered User.
Local time
Today, 17:18
Joined
May 22, 2002
Messages
136
I am trying to count the number of records in a subform w/ linked fields "Index". The following code works without the "SIndex" criteria, but I want to count the number of records w/ SIndex (of the subform) equalling a certain value.

= DCount("*", "Job Summary Query", "SIndex =" & SIndex And "Index =" & [Index])
 
= DCount("*", "Job Summary Query", "SIndex =" & SIndex & "And Index =" & [Index])
 
Try This

= DCount("*", "Job Summary Query", "SIndex =" & SIndex & " And Index =" & [Index])

Here the assumption is that both fields are numeric. If they are text then it will go like this

= DCount("*", "Job Summary Query", "SIndex ='" & SIndex & "' And Index ='" & [Index] & "'")

Cheers!
Aqif
 

Users who are viewing this thread

Back
Top Bottom