Query in Access

D

Don

What am I doing wrong?
I have a field "Item_Month" .In the query 'criteria' I
want to use Month([Item_Month]).
When I enter 12 or a number I receive nothing. The Months
are Jan Feb etc..
Any help with this Function Month( ) would be appreciated.
Thanks
Don
 
B

Brendan Reynolds

I can't quite tell from your description exactly how you're using the
Month() function. Could you post the SQL for the query?

(If you're not sure how, open the query in design view, choose 'SQL View'
from the menu, select all the text in SQL View, press Ctrl+C to copy it,
then paste the copied text into your newsreader.)
 
V

Van T. Dinh

The input argument of the Month() must be a valid date value or some (Text)
String that Access can type-cast to a date value.

In your case, this applies to your Field [Item_Month]. If you simply have
"Jan" / "Feb" / ... as possible values for this Field, it won't work.

If this is the case, you need to use a "look-up" Table with 12 Records to
translate "Jan" to 1, "Feb" to 2, ... and use this "look-up" Table in your
Query.

Access Help / Access VB Help should be your first resource for help with any
function rather than posting and waiting for answers. What I wrote in the
first 2 paragraphs you could have found out in Access VB Help.
 

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