Count Function in Query

G

Guest

Access 2003

I have a table with Fields "Country" & "App Received Date"
My Query uses the "Group" Function & "Count" Function for the field "Country"
and "App Received Date" as the criteria using the "Where" function.
The intention is to query which country received how many applications
during the specified period. - This works well - However, the query only
renders the countries that have a value, I need to show the countries with
Null values as well.
I tried =Null, Is Null, Is Not Null, "" etc and no luck.

Any advise on how to achieve this is appreciated
 
G

Guest

Change the group By Country column to
CountryName: Nz(Country,"")

Change the Count Country column to
CountryCount: Nz(Country,"")
 
V

Van T. Dinh

Do you have a tblCountry that in a One-to-Many relationship with the tblApp?

If you do, use both Tables in your Query but select Left Join from
tblCountry to tblApp. The SQL String of the Query should be something like:

SELECT C.Country, Count(A.RecordID)
FROM tblCountry As C LEFT JOIN
tblApp As P On C.CountryID = A.frg_CountryID
WHERE A.[App Received Date] Between ... And ...
GROUP BY C.Country
 

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