Results 1 to 2 of 2
  1. #1
    kami217 is offline Novice
    Windows 10 Access 2016
    Join Date
    Nov 2018
    Posts
    1

    Show Expense if within Date Range

    Hi,

    I've been doing some searching online and haven't been able to find specifically what I'm looking for.
    I'm familiar with SQL/Excel - but not as up to speed with Access, so unsure how to implement this query.

    I have a table with the following Data:

    Rent 1, Rent 1 Start, Rent 1 End, Rent 2, Rent 2 Start, Rent 2 End, (etc...),Utilities, Insurance


    I want to be able to run a query that says - if Today() is between rent start/rent end, pull that value.

    So for example:
    Rent 1 Rent 1 Start Rent 1 End Rent 2 Rent 2 Start Rent 2 End Utilities Insurance
    $1000 1/1/17 12/31/17 $2000 1/1/18 12/31/18 $500 $350


    I would like the report to only pull the Rent for $2000 (since it's 2018) + $500 (Utilities) + $350 (Insurance) = $2,850 expenses per month




    Can anyone assist? I'm assuming I would have to select all and then use an If/Then statement?


    Thanks in advance for any help you can provide.

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,771
    This is not a normalized data structure and that greatly complicates search and filter and summarizing efforts.

    Did you import spreadsheet into Access?

    Yes, an IIf is likely needed.

    IIf(Date() BETWEEN [Rent 1 Start] AND [Rent 1 End], [Rent 1], [Rent 2]) + [Utilities] + [Insurance]
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

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

Similar Threads

  1. Replies: 0
    Last Post: 08-21-2018, 07:01 AM
  2. Replies: 17
    Last Post: 07-31-2018, 01:23 PM
  3. Replies: 3
    Last Post: 02-01-2015, 08:05 PM
  4. Getting a date range to show on a report
    By recon2011 in forum Reports
    Replies: 3
    Last Post: 01-10-2012, 01:27 PM
  5. Criteria to show date range
    By Douglasrac in forum Queries
    Replies: 2
    Last Post: 03-24-2011, 03:58 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