Results 1 to 2 of 2
  1. #1
    Turtle is offline Novice
    Windows 10 Access 2016
    Join Date
    May 2019
    Posts
    1

    sum value when a date is within 2 fields

    here is the setup:
    [AM and OE] table has a field w/ date, USD or CAD, and another field with $
    [Currency Conversion] table has 3 fields:
    CAD to USD (Example: 1.362)
    Effective Date (Example: 1/1/2019)
    Effective to (Example: 01/31/2019)

    I need a query that looks like this:

    if [AM and OE] = CAD and [AM and OE] date is between [currency conversion] effective date and effective to date, return the sum of [Currency Conversion] CAD to USD / [AM and OE] $



    end result
    The query will update $$ field on [AM and OE] table that as a net value (calculated) USD to USD or CAD to USD

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,822
    Why are you saving calculated aggregate data? Saving aggregate calc is not simple. Requires domain aggregate function and/or VBA.
    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: 2
    Last Post: 04-15-2019, 01:50 PM
  2. Replies: 2
    Last Post: 03-09-2016, 04:15 PM
  3. Replies: 4
    Last Post: 04-22-2015, 05:50 AM
  4. Replies: 5
    Last Post: 12-12-2013, 12:14 PM
  5. Replies: 12
    Last Post: 05-07-2012, 12:41 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