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

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

Guest

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.
 
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?
 
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.
 
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.
 

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


Back
Top