Query Question

  • Thread starter Thread starter Larry Dietrick
  • Start date Start date
L

Larry Dietrick

I have two fields in a table. One is a date in the form
1/1/03, and one is a Yes/No field. I want to create a
query that will tell me how many of the entries in one
month (say January) have a corresponding Yes in the second
field. In other words, how many of the entries that begin
with a "1" in the date field are "Yes" in the "Yes/No"
field. Any ideas? Thanks in advance for any help.
 
The SQL String should be something like:

SELECT Count(*)
FROM YourTable
WHERE (DateField BETWEEN #01/01/2003# AND #01/31/2003#)
AND (YesNoField = True)

In code you can also use the DCount() function.

Check Access VB on the DCount() function

HTH
Van T. Dinh
MVP (Access)
 

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

Similar Threads

Complex query 4
Dlookup 7
Access Dcount (multiple criteria) 3
field value concatenation VBA 1
Date search query 0
Field entry dependent on another field value 2
Count and sum per month in a query 2
order number in query 2

Back
Top