filter month

R

rivers

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
 
S

Steve Schapel

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.
 

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

Top