Results 1 to 3 of 3
  1. #1
    dtbconfusion is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Aug 2016
    Posts
    7

    Limiting Report Field to certain dates

    Hello, I have a report that has a field which sums the value of a group of objects. However, there is another field that tells which year the object was manufactured.



    This is what I have so far in the field:

    =Round(Sum([Value]),3)

    How can I make it so that it only sums the value of things manufactured before a certain year?

  2. #2
    ranman256's Avatar
    ranman256 is online now VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,521
    In a form, frmRpt, put a textbox, txtYr, default value =year(date)

    the query in the report will look at this box,
    select * from table where year([myDateFld]) < forms!frmRpt!txtYr

  3. #3
    Bulzie is online now VIP
    Windows 7 64bit Access 2007
    Join Date
    Nov 2015
    Posts
    1,463
    Try Something like:

    = "Select Round(Sum(Value),3) as TotalValue From YourTable Where ManufacturedYear < "# & Me.TargetDate & "#")

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

Similar Threads

  1. Limiting Report to certain Dates
    By Varda in forum Programming
    Replies: 22
    Last Post: 05-22-2015, 05:30 PM
  2. Limiting size of a field
    By Manass in forum Access
    Replies: 1
    Last Post: 08-14-2013, 03:39 PM
  3. Limiting entry in date field to three dates
    By cmwpcol in forum Access
    Replies: 5
    Last Post: 09-24-2012, 03:49 PM
  4. Limiting list box by another field
    By lukebowes in forum Access
    Replies: 15
    Last Post: 05-21-2012, 12:12 AM
  5. Replies: 5
    Last Post: 09-16-2009, 05:22 PM

Tags for this Thread

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