More Than 1 Field

  • Thread starter open a adobe file from a command button
  • Start date
O

open a adobe file from a command button

I have a query that counts the number of occurrences by month, the code is
"select format(Receive, "yyyy\-mm"), count(*) FROM Table1 GROUP BY
Format(Receive, "yyyy\-mm"). I was getting help from someone but now I can't
find that post. My question is can I make this work for the other 4 date
fields in the table or do I have to create a query for each date field.

Thank You
TryingToUnderstand
 
D

Duane Hookom

Can you provide your table and field names as well as a few records? Have
you given any thought regarding how you would like the results to display?

Duane Hookom
MS Access MVP

"open a adobe file from a command button"
 
J

John W. Vinson

I have a query that counts the number of occurrences by month, the code is
"select format(Receive, "yyyy\-mm"), count(*) FROM Table1 GROUP BY
Format(Receive, "yyyy\-mm"). I was getting help from someone but now I can't
find that post. My question is can I make this work for the other 4 date
fields in the table or do I have to create a query for each date field.

Thank You
TryingToUnderstand

If you've got four date fields in the table and you need to count records for
each of them, your table structure may not be correctly normalized! Might you
someday need a *fifth* date? If so, you have a one to many relationship
embedded in each record of your table, and you should really have two tables.

What is the actual structure of your table? What do these dates mean, and what
is it that you want to count? You'll need either four queries, or a rather
complex query (probably a UNION query), because Access doesn't count dates, it
counts *records* - and a given record in your table could be in four different
groups!
 

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