How do I set Access criteria to display (Month) 01 to (Month) 31

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have an access database. I need to design a queary that will display data
between the first day of a given month and the last day of a given month.
Can any help me.
 
I have an access database. I need to design a queary that will display data
between the first day of a given month and the last day of a given month.
Can any help me.

Of what year?

As criteria in the SQL:

Where Format(YourTable.[DateField],"m/yyyy") = [Enter month and year
m/yyyy]

Enter 1/2005 for Jan. 2005
or
11/2005 for Nov 2005
etc.
 
I have an access database. I need to design a queary that will display data
between the first day of a given month and the last day of a given month.
Can any help me.

In addition to Fred's suggestion, you can use a criterion
= DateSerial([Enter year:]), [Enter month number:], 1) AND < DateSerial([Enter year:], [Enter month number:] + 1, 1)

This has the advantage that it will use any Index on the date field.

John W. Vinson[MVP]
 
John:
Is that in addition to or instead of and do I enter your criteria in the
SQL. As you might have guessed I'm not a programming wizard.

John Vinson said:
I have an access database. I need to design a queary that will display data
between the first day of a given month and the last day of a given month.
Can any help me.

In addition to Fred's suggestion, you can use a criterion
= DateSerial([Enter year:]), [Enter month number:], 1) AND < DateSerial([Enter year:], [Enter month number:] + 1, 1)

This has the advantage that it will use any Index on the date field.

John W. Vinson[MVP]
 
Back
Top