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 / March 2008

Tip: Looking for answers? Try searching our database.

Select all dates in month from month and year in text box?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
LeeZard - 03 Mar 2008 15:30 GMT
I have a form to run reports.  All reports are run based on the month and
year but the table data contains actual dates.  On the form the client enters
03/2007 in a text box to select reports containing data for March 2007.  The
text box has a format mm/yyyy.  The table data has fields defined as
Date/Time.  Data looks like 3/15/2007.  How can I use the month and year from
the text box my form to select all of the dates that fall within the month
and year requested?
Jerry Whittle - 03 Mar 2008 16:38 GMT
In the criteria of the query that drives the report:

Between [Forms]![frmParameterDates]![txtParameter] And
(DateAdd("m",1,[Forms]![frmParameterDates]![txtParameter])-0.0001)

Make sure to use the actual form and field name. Remember that the form must
stay open but can be hidden or invisible.
Signature

Jerry Whittle, Microsoft Access MVP
Light. Strong. Cheap. Pick two. Keith Bontrager - Bicycle Builder.

> I have a form to run reports.  All reports are run based on the month and
> year but the table data contains actual dates.  On the form the client enters
[quoted text clipped - 3 lines]
> the text box my form to select all of the dates that fall within the month
> and year requested?
 
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.