Link to home
Start Free TrialLog in
Avatar of Tricia McKeating
Tricia McKeatingFlag for United Kingdom of Great Britain and Northern Ireland

asked on

Using DCOUNT in Access with multiple criteria

Hi,

I have a database that tracks pupil progress with different subjects which are rated at different levels . I have a Y/N filed which indicates if the subject has been passed.  I have this written in the footer of the form

=DCount("PupilID","S2 List","PupilID=" & [PupilID] & " AND Pass= TRUE" AND " LCode=3 ")

If I run it with

=DCount("PupilID","S2 List","PupilID=" & [PupilID] & " AND Pass= TRUE" )

It tells me how many subjects have been passed but if I add the bit that asks  for those subjects with level (LCode) 3 that have been passed it just counts all the records my guess is i have some quotes in wrong place but cannot work it out ...

Any help appreciated.
ASKER CERTIFIED SOLUTION
Avatar of mbizup
mbizup
Flag of Kazakhstan image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Tricia McKeating

ASKER

Thanks you saved me hours of torture with spaces quotes and brackets...works perfectly! Much appreciated.