How do I use count if in access?

  • Thread starter Thread starter Leigh
  • Start date Start date
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]
 
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
 
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))
 
Back
Top