DCount in a table

thescottsman

Registered User.
Local time
Today, 09:07
Joined
Sep 18, 2014
Messages
42
Hi All

I hope you can help

I have a table that displays the year and month and another field that I want to calculate how many id have that month and year from another table

can anyone help please
 
you cant do calculations in a table, you do those in queries, forms or reports.
 
How can I then run the query that I want

Could do a sql as have the basis but how would I pull column values into the sql. This is what I have:

SELECT Count(*) AS Expr1
FROM tblSummary
WHERE (((Year([DeliveryDate]))='2014') AND ((Month([DeliveryDate]))='11'));
 
Well you start by making the proper query, you want a count per year and month....
Your proper query would be:
Code:
Select Year(DeliveryDate), month(DeliveryDate), count(*)
From tblSummary
Group by Year(DeliveryDate), month(DeliveryDate)
do the same for the other table

Now make a third query that "join's" the two queries on year and month and be a happy Scottsman (who is obviously happy to be part of the UK :) )
 

Users who are viewing this thread

Back
Top Bottom