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 / December 2005

Tip: Looking for answers? Try searching our database.

Selecting query from date range

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
StuJol - 29 Nov 2005 17:11 GMT
i have several queries which have a date range as a filter (between dates) eg
i put in on a form start date: 21 nov 05 and end date 20 nov 06 and the query
filters out all other records.

what im having to do is each year, alter the dates to the current year. eg
business year starts 01 jan 05 ends 31 dec 06.

Does some one know some code where i can just type in 01 jan and 31 dec
without putting in the year and every year the year updating automatically
StuJol - 29 Nov 2005 17:46 GMT
i have several queries which have a date range as a filter (between dates) eg
i put in on a form start date: 21 nov 05 and end date 20 nov 06 and the query
filters out all other records.

what im having to do is each year, alter the dates to the current year. eg
business year starts 01 Feb 05 ends 31 jan 06.

Does some one know some code where i can just type in 01 feb and 31 jan
without putting in the year and every year the year updating automatically

> i have several queries which have a date range as a filter (between dates) eg
> i put in on a form start date: 21 nov 05 and end date 20 nov 06 and the query
[quoted text clipped - 5 lines]
> Does some one know some code where i can just type in 01 jan and 31 dec
> without putting in the year and every year the year updating automatically
John Vinson - 02 Dec 2005 17:47 GMT
>Does some one know some code where i can just type in 01 feb and 31 jan
>without putting in the year and every year the year updating automatically

I'm not sure I understand. You want the day and month to be static,
not user input, and the year to change? If so, try

BETWEEN DateSerial(Year(Date()), 2, 1) AND DateSerial(Year(Date()), 3,
0)

to get the whole month of February.

If the date is input by the user, just have them leave off the year.
Typing 2/1 into a date field will automatically fill in February 1 of
the current year.

                 John W. Vinson[MVP]    
 
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



©2008 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.