Solved

Break down date range into month identifiers in ACCES 2010

Posted on 2013-12-17
3
324 Views
Last Modified: 2013-12-22
I am getting tired and desperately need help.  I have  ultimately a report that will span 18 months, can start at any time during the year so, say if the user wants to start the 18-month span on April 15 2013, then Month1 is April, Month2 is May, up to the next 18 months. However, in the data source, for a project I could have to start with is a date range say, Start Date for FTE Assignment = May 20, 2013, End Date for FTE Assignment is September 20, 2014.  I need a way to assign May as the Month2 and each month thereafter the next consecutive month number.  I have a procedure that use the report start date to determine which months are to be considered as Month1, Month2, etc to Month18, but I need to take the data start and end dates, break it down into the months as assign each month to the correct Month Report number and am at a loss.  I thought I would start with a date diff to get the count of the months between May and the end Start date, but then got stuck.  I am trying to get staffing needs for various projects over the 18-month span and the projects all start/end on different dates, so need to determine staff needs for the months.

Hope that makes sense.

Sandra
0
Comment
Question by:ssmith94015
  • 2
3 Comments
 
LVL 13

Expert Comment

by:magarity
ID: 39725718
This kind of project is made a lot easier with a standalone date reference table.  Make a table with a sequence number for the primary key and then dates as days,  dates as text, a column for number in year, etc. Populate the table with years of dates and make sure they are in order so the sequence number is in order. Then you can use the sequence number to do the 18 month calculations, etc.
Sorry, I'm typing this on a phone so I can't go into much detail but hopefully you get the ideas.  Any questions I can write more tomorrow
0
 

Accepted Solution

by:
ssmith94015 earned 0 total points
ID: 39725757
Actually, that really does not get to the problem is dynamically assigning the month sequence to varying start months.  I appreciate the suggestion, but I tried that and still had the same problem.  Actually, I built  function that if I pass in the FTE start date and the start date of the report, it seems to return what I need.  However, am going to post another related question on this subject, again thank you.
0
 

Author Closing Comment

by:ssmith94015
ID: 39734481
Created function that actually did the needed processing.
0

Featured Post

U.S. Department of Agriculture and Acronis Access

With the new era of mobile computing, smartphones and tablets, wireless communications and cloud services, the USDA sought to take advantage of a mobilized workforce and the blurring lines between personal and corporate computing resources.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A theme is a collection of property settings that allow you to define the look of pages and controls, and then apply the look consistently across pages in an application. Themes can be made up of a set of elements: skins, style sheets, images, and o…
Describes a method of obtaining an object variable to an already running instance of Microsoft Access so that it can be controlled via automation.
What’s inside an Access Desktop Database. Will look at the basic interface, Navigation Pane (Database Container), Tables, Queries, Forms, Report, Macro’s, and VBA code.
In Microsoft Access, learn how to use Dlookup and other domain aggregate functions and one method of specifying a string value within a string. Specify the first argument, which is the expression to be returned: Specify the second argument, which …

773 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question