Date Range form/paramater help

Prime76

New member
Local time
Today, 15:31
Joined
May 23, 2008
Messages
7
Hi All, This question kind of falls into a couple categories but it's for a report so i'll start here. So my question is im currently tracking employees in a database where they enter their learning credits and it keeps track of dates/places/classes and ultimately credits earned. My dilemma is that employees are on either a 2 year odd cycle (i.e. 7/1/11 thru 6/30/13) or a 2 year even cycle (i.e. 7/1/10 thru 6/30/12). I currently have a form where they can select their name and retrieve their report but i'd like to have them also select the date range in which they would like to run the report for (based off the start date of the actual training). Another issue is we need to keep track of all prior 2 year cycles. I was thinking a drop down list with the date ranges and they select which date range they would want would work but i cant seem to figure out the best way to approach it. Any help would be appreciated.
 
Use a Query and Form,

Add text boxes to a form and name them in the properties, such as txtStartDate and txtEndDate, set the Format properties to use Date/Time (This should provide you with a dataPicker when you change the view if you are using Access 2007 or 2010), Save the form something like frmSearch then in a query select the fields from the table and in the criteria use the Expression Builder Wizard to select the Form and each text box if from the same field in your table it would be using something like this:

Between[FrmSearch]![txtStartDate]And[FrmSearch]![txtEndDate]

Save the query with a name something like qrySearch

Then you create a report based on the query and then add a command button to your form to open the report and it should return the values from the textboxes on the form. If you need to set more parameters use the query such as Person Name or ID field, they will also need to be on the form.
 

Users who are viewing this thread

Back
Top Bottom