Results 1 to 5 of 5
  1. #1
    mindbender is offline Competent Performer
    Windows XP Access 2007
    Join Date
    May 2013
    Posts
    283

    YTD by month from a drop down

    I have a drop down that contains all 12 months in a list. What I am trying to do is for example if the user selects march - the data returned woudl be YTD to March (Jan-Mar) or if the user selects August - the data returned woudl be YTD Aug (Jan-Aug)



    Any help would be appreciated

    Thanks

  2. #2
    burrina's Avatar
    burrina is offline VIP
    Windows 8 Access 2010 32bit
    Join Date
    Oct 2012
    Location
    Freeport,Texas
    Posts
    1,383
    You can of course use a table/query as the record source or a value list with the month names. Up to you! Example in query below of YTD.
    SomeField:>=DateSerial(Year(SomeDate()),1,1) And <=SomeDate()
    HTH
    Attached Thumbnails Attached Thumbnails YTD.jpg  

  3. #3
    mindbender is offline Competent Performer
    Windows XP Access 2007
    Join Date
    May 2013
    Posts
    283
    Thanks for the reply. I was hoping for somthing like the attached. Where they choose the month and the data returned is up to the last day of the month selected

  4. #4
    mindbender is offline Competent Performer
    Windows XP Access 2007
    Join Date
    May 2013
    Posts
    283
    Here is the image I modified to show what I mean

    Click image for larger version. 

Name:	YTD.jpg 
Views:	7 
Size:	173.7 KB 
ID:	18181

  5. #5
    burrina's Avatar
    burrina is offline VIP
    Windows 8 Access 2010 32bit
    Join Date
    Oct 2012
    Location
    Freeport,Texas
    Posts
    1,383
    I use this code for the form's record source.







    AppliedPayments: Format([OrderDate],"myyyy")
    'Criteria Below


    [Forms]![frmSalesTax]![MonthID]
    HTH

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 43
    Last Post: 08-06-2014, 08:21 PM
  2. Replies: 5
    Last Post: 06-17-2014, 12:11 AM
  3. Replies: 6
    Last Post: 05-05-2014, 10:51 PM
  4. Replies: 4
    Last Post: 05-26-2013, 03:28 PM
  5. Replies: 3
    Last Post: 11-29-2011, 07:01 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums