Click here to Skip to main content
15,888,579 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Need big help, I have TblIDexpiry in access db, and in my form I have 12 Labels, named each month January to December, I want to count How many Records in each Month of a Year display it on a Label of every month.

What is the correct query to use?

What I have tried:

I tried And Declare Date.Today.Month and Date.Today.Year and use it in query, Select Count('ColumnName') from TblName where ColumnName = "& D.T.M &", but only counting all data in that table. Not filtering by each month.
Posted
Updated 30-May-18 11:48am

1 solution

You need to learn a lot more SQL - and since is your homework, that's why it was given to you.

Here's a SQL reference that will give you what you need to know - but you will need to learn it: SQL GROUP BY Statement[^]

You'll have to understand it - not very difficult and translate it into VB.NET.
 
Share this answer
 
Comments
Member 13702605 31-May-18 1:25am    
Sorry Balboos, but Im not using SQL, im using only Access as Database.
W Balboos, GHB 31-May-18 6:29am    
So you can't look into Access features and find the same functionality? If that's too hard to do, or too difficult to grasp - you should consider another field of study as soon as possible.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900