Modifying my Date Select Query

S

Scuda

Hi all, my goal is to search by entering a Month, Start Date, End Date and
Year to a query. What I have now gives me just the month of this year. My
current SQL is posted below. Any help is GREATLY appreciated!

teph

Between DateSerial(Year(Date()),[Enter month NUMBER (1-12)],1) And
DateSerial(Year(Date()),1+[Enter month NUMBER (1-12)],0)
 
K

KARL DEWEY

Your problem is that you are using the same prompt for beginning and ending
month - [Enter month NUMBER (1-12)]
They just gotta be different like this --
[Enter start month NUMBER (1-12)]
[Enter end month NUMBER (1-12)]

Another problem I foresee is the year. You are using the year of the
current date.
Why not prompt for a date entry format like this --
[Enter start date - 1/23/2005]
[Enter end date - 1/23/2005]
 
S

Scuda

Sometimes I don't see something right under my nose.

Thanks so much Karl!!!

KARL DEWEY said:
Your problem is that you are using the same prompt for beginning and ending
month - [Enter month NUMBER (1-12)]
They just gotta be different like this --
[Enter start month NUMBER (1-12)]
[Enter end month NUMBER (1-12)]

Another problem I foresee is the year. You are using the year of the
current date.
Why not prompt for a date entry format like this --
[Enter start date - 1/23/2005]
[Enter end date - 1/23/2005]
--
KARL DEWEY
Build a little - Test a little


Scuda said:
Hi all, my goal is to search by entering a Month, Start Date, End Date and
Year to a query. What I have now gives me just the month of this year. My
current SQL is posted below. Any help is GREATLY appreciated!

teph

Between DateSerial(Year(Date()),[Enter month NUMBER (1-12)],1) And
DateSerial(Year(Date()),1+[Enter month NUMBER (1-12)],0)
 

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