Results 1 to 4 of 4
  1. #1
    ashleyhickman is offline Novice
    Windows 8 Access 2010 32bit
    Join Date
    Mar 2018
    Posts
    2

    Date Calculator in Report Expression

    I apologize in advance - I have almost no working knowledge of access. I have to use it at work and have been tasked with creating an expression in a report to run a date calculation.

    I use an Access report to list all the projects I have going on, and each one has a checkbox that I check if it's been proofed and is ready to go. I've created a date calculator at the top of the report that will calculate the number of days between today and the furthest due date. I am trying to change the date calculator to calculate the number of days between today and the furthest due date IF and only if my checkbox is checked showing that is it completed. Specifically, I only want the expression to pull entries from projects that have "yes" in the "Proofed" field.

    This is my date calculator: =DateDiff("d",Date(),Max([EffectiveDate]))

    This will calculate the days between today and the last due date of my projects, but I need it to only from entries that have "yes" in a certain field. Any suggestions on how to do this? I am probably doing this in a very convoluted way, using a report instead of a query or so on.



    Thanks!

  2. #2
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,652
    Try

    =DateDiff("d",Date(),DMax("[EffectiveDate]", "SourceQueryName", "Proofed = True"))

    where
    SourceQueryName is the name of the query the report is based on.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    ashleyhickman is offline Novice
    Windows 8 Access 2010 32bit
    Join Date
    Mar 2018
    Posts
    2
    That worked! Thank you!!

  4. #4
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,652
    Happy to help and welcome to the site by the way!
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

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

Similar Threads

  1. Textbox Calculator
    By Randy in forum Access
    Replies: 10
    Last Post: 03-16-2019, 07:36 PM
  2. Distance Calculator.
    By Homegrownandy in forum Macros
    Replies: 3
    Last Post: 08-25-2016, 02:30 AM
  3. Replies: 3
    Last Post: 02-21-2016, 05:44 PM
  4. Calculator
    By Azeez_Andaman in forum Access
    Replies: 1
    Last Post: 08-14-2011, 12:10 PM
  5. Excel calculator
    By warrigal in forum Database Design
    Replies: 0
    Last Post: 03-15-2011, 05:50 PM

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