filter month

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

Guest

hi i have a filter by date function on the main page need to be able to
access the the month November and December

my code is
=(Month([Date]="11")) for November but it returns all records i am using a
macro and this is in the where condition section please help
 
Rivers,

2 problems here. One is that the parentheses are incorrectly placed.
The other is that the Month() function returns a number, not text, so
the ""s are incorrect. Try it like this...
=Month([Date])=11

It is also not clear what you are doing with this, as you forget to
mention the macro action(s) involved here. You said "where condition"
which makes me suspect you are maybe using an OpenForm action or an
OpenReport action in your macro. If so, most likely the = at the
beginning is also wrong. Should just be...
Month([Date])=11

By the way, as an aside, the word 'date' is a Reserved Word (i.e. has a
special meaning) in Access, and as such should not be used as the name
of a field or control. Looks like you have a field named Date, so I
would recommend you change this.
 
Back
Top