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)
 
Back
Top