How can i open query to display records for current month and year

G

GGill

I have field name 'month' in 'Table1' and the data in 'Table1' like this;
Sep 2005
Oct 2004
Nov 2005
Nov 2003
and t.e.

What criteria in a query do I need too use to pull only curent month and
year? Please help me.
 
R

Rick Brandt

GGill said:
I have field name 'month' in 'Table1' and the data in 'Table1' like
this; Sep 2005
Oct 2004
Nov 2005
Nov 2003
and t.e.

What criteria in a query do I need too use to pull only curent month
and year? Please help me.

What us the DataType of the field?
 
R

Rick Brandt

GGill said:
Data Type on that field is Text

Then use,,,

WHERE [Table1]![Month] = Format(Date(), "mmm yyyy")

Also, not a good idea to name a field "Month" as that is a reserved word in
Access (there is a Month() function). The square brackets around the field name
will "usually" take care of this, but it's better to use RecordMonth or similar.
 
G

GGill

Hi Rick,
It's working exactly like want it,
Tank you so... so much,
I am very happy.

Rick Brandt said:
GGill said:
Data Type on that field is Text

Then use,,,

WHERE [Table1]![Month] = Format(Date(), "mmm yyyy")

Also, not a good idea to name a field "Month" as that is a reserved word in
Access (there is a Month() function). The square brackets around the field name
will "usually" take care of this, but it's better to use RecordMonth or similar.
 
Top