+ Reply to Thread
Results 1 to 3 of 3

Generating results from two different start dates

  1. #1
    Registered User
    Join Date
    10-23-2013
    Location
    Cypress, TX
    MS-Off Ver
    Excel 2013
    Posts
    26

    Generating results from two different start dates

    Hi,

    I'm working on my first Access database and have it mostly finished. However, there is a step I cannot figure out how to do.

    For simplicity here is what I have:

    TABLE: PaintUse
    Fields: [StartDate] and [Amount]

    QUERY: [StartDate], [Amount], and AdjustedAmount: [Amount]*0.25
    Under the criteria for [StartDate] I have >=[Report Start Date] AND <=[Report End Date]

    REPORT (using the above Query):
    Detail Section: Lists each activity starting with the manually entered StartDate and ends with the manually entered EndDate.
    Calculates [AdjustedAmount] for each record

    Weekly Footer Section: Calculates the weekly total of [AdjustedAmount]

    Report Footer Section: Currently have AnnualAmount = Sum(AdjustedAmount)

    What I need is the AnnualAmount to be the last 365 days no matter what the difference between the StartDate and EndDate is. Right now if the difference is 31 days this is all my AnnualAmount encompasses. To get a 365 day span, I have to run the query with a StartDate and EndDate exactly 365 days apart.


    So what I am wondering is how, through the Query and/or Report Designer (would prefer not to program in VBA but just put an expression or expressions in the Query builder) can I get the Detail Section to continue to do what it is currently doing (listing all the records between the two manually entered dates) and get the report footer to provide the sum using the EndDate and the previous 365 days.

    Thanks.

    Steve

  2. #2
    Valued Forum Contributor ranman256's Avatar
    Join Date
    07-29-2012
    Location
    Kentucky
    MS-Off Ver
    Excel 2003
    Posts
    1,176

    Re: Generating results from two different start dates

    Sounds like you need another query.
    One for the main data dates,
    And the footer for the year.

    I would use a form, with text boxes for start and end date. So you don't have to type in the dates over and over.
    The form can also have the year dates based on the entered start /end dates.
    The main query uses the txtStart and txtEnd.
    The footer query (sub report) can use the txtYrStart, and txtYrEnd.

  3. #3
    Registered User
    Join Date
    10-23-2013
    Location
    Cypress, TX
    MS-Off Ver
    Excel 2013
    Posts
    26

    Re: Generating results from two different start dates

    Thanks. I'll give it a try.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 9
    Last Post: 02-11-2015, 05:47 PM
  2. Not sure where to start... generating an email from Excel based on a date
    By metalsped in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-25-2013, 10:34 AM
  3. Replies: 9
    Last Post: 03-05-2012, 08:17 AM
  4. Replies: 5
    Last Post: 06-30-2011, 03:26 PM
  5. Looping Generating Specific Dates in Six Month Intervals between end and start date
    By LenaJ887 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 09-16-2010, 02:59 AM
  6. [SOLVED] Generating graphs with less than results
    By Scott from Gippsland in forum Excel General
    Replies: 1
    Last Post: 05-16-2006, 08:10 AM
  7. [SOLVED] Generating a blank worksheet at the start of the month
    By Phil in forum Excel - New Users/Basics
    Replies: 1
    Last Post: 01-27-2005, 10:06 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1