Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Queries / April 2008

Tip: Looking for answers? Try searching our database.

Modifying my Date Select Query

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Scuda - 22 Apr 2008 18:24 GMT
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)
KARL DEWEY - 22 Apr 2008 20:20 GMT
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]
Signature

KARL DEWEY
Build a little - Test a little

> 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
[quoted text clipped - 4 lines]
> Between DateSerial(Year(Date()),[Enter month NUMBER (1-12)],1) And
> DateSerial(Year(Date()),1+[Enter month NUMBER (1-12)],0)
Scuda - 23 Apr 2008 12:58 GMT
Sometimes I don't see something right under my nose.

Thanks so much Karl!!!

> Your problem is that you are using the same prompt for beginning and ending
> month - [Enter month NUMBER (1-12)]
[quoted text clipped - 16 lines]
> > Between DateSerial(Year(Date()),[Enter month NUMBER (1-12)],1) And
> > DateSerial(Year(Date()),1+[Enter month NUMBER (1-12)],0)
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.