Parameter using Month Number

N

Nikki

I have a column in a query that is ship date. I want to find all of these
for one month. How can I just query the user to enter the month number.
 
T

Tom Lake

Nikki said:
I have a column in a query that is ship date. I want to find all of these
for one month. How can I just query the user to enter the month number.

Create a computed column in the query:

MonthNo: Month([MyDate])

(replace MyDate with the name of your date field, of course)

then for the criteria in that column:

[Enter Month Number]

That won't test for years, though.

Tom Lake
 
N

Nikki

Is there a way to query for the year using only one parameter box?
--
Thanks,
Nikki


Tom Lake said:
Nikki said:
I have a column in a query that is ship date. I want to find all of these
for one month. How can I just query the user to enter the month number.

Create a computed column in the query:

MonthNo: Month([MyDate])

(replace MyDate with the name of your date field, of course)

then for the criteria in that column:

[Enter Month Number]

That won't test for years, though.

Tom Lake
 
D

Duane Hookom

Do the same thing as Tom suggested for Month only use
Year([MyDate])

--
Duane Hookom
MS Access MVP


Nikki said:
Is there a way to query for the year using only one parameter box?
--
Thanks,
Nikki


Tom Lake said:
Nikki said:
I have a column in a query that is ship date. I want to find all of
these
for one month. How can I just query the user to enter the month
number.

Create a computed column in the query:

MonthNo: Month([MyDate])

(replace MyDate with the name of your date field, of course)

then for the criteria in that column:

[Enter Month Number]

That won't test for years, though.

Tom Lake
 
Top