How do I use count if in access?

L

Leigh

I am trying to add a count if fuction to my report. I run this query and I
want it to ountif like Copy only. How would I show this on the last page of
the report?

SELECT [Vault Audit].[Loan Number], [Vault Audit].[Date reviewed], [Vault
Audit].[Original Signed Note?], [Vault Audit].[Scanned Note?], [Vault
Audit].[Scanned Mortgage?], [Vault Audit].[Scanned Title Work?], [Vault
Audit].Comments
FROM [Vault Audit]
WHERE ((([Vault Audit].[Original Signed Note?]) Not Like "yes")) OR
((([Vault Audit].[Scanned Note?]) Like "N*")) OR ((([Vault Audit].[Scanned
Mortgage?]) Like "N*")) OR ((([Vault Audit].[Scanned Title Work?]) Like "N*"))
ORDER BY [Vault Audit].[Loan Number]
 
J

Jeff Boyce

Leigh

I seem to recall the CountIf function as being an Excel function, not an
Access function.

You described "how" you wanted to do something, but not what that something
was. There may be alternate approaches, if we understood the underlying
need better.

Regards

Jeff Boyce
Microsoft Office/Access MVP
 
F

fredg

I am trying to add a count if fuction to my report. I run this query and I
want it to ountif like Copy only. How would I show this on the last page of
the report?

SELECT [Vault Audit].[Loan Number], [Vault Audit].[Date reviewed], [Vault
Audit].[Original Signed Note?], [Vault Audit].[Scanned Note?], [Vault
Audit].[Scanned Mortgage?], [Vault Audit].[Scanned Title Work?], [Vault
Audit].Comments
FROM [Vault Audit]
WHERE ((([Vault Audit].[Original Signed Note?]) Not Like "yes")) OR
((([Vault Audit].[Scanned Note?]) Like "N*")) OR ((([Vault Audit].[Scanned
Mortgage?]) Like "N*")) OR ((([Vault Audit].[Scanned Title Work?]) Like "N*"))
ORDER BY [Vault Audit].[Loan Number]

Your question is not very clear, so I'll guess you wish to get the
count of the number of times a field value equals "Copy". Is that
correct?

In the Report Footer, add an unbound control.
Set it's control source to:
=Sum(IIf([SomeField] = "Copy",1,0))
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top